function Popup(Url, Width, Height){
	var w = Width;
	var h = Height;
	var sw = GetWindowWidth();
	var sh = GetWindowHeight();
	var l = (sw) ? (sw-w)/2 : 0;
	var t = (sh) ? (sh-h)/2 : 0;
	window.open(Url, "Popup", 'height='+h+',width='+w+',top='+t+',left='+l+',scrollbars=yes,resizable=yes');
}

function Popup(Url){
	window.open(Url, "_blank");
}

function GetWindowWidth(){
	if (document.all){
		return top.window.document.body.clientWidth;
	}else{
		return top.window.innerWidth;
	}
}
function GetWindowHeight(){
	if (document.all){
		return top.window.document.body.clientHeight;
	}else{
		return top.window.innerHeight;;
	}
}

		function MM_preloadImages() { //v3.0
		var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
			var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
			if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
		}

		function MM_swapImgRestore() { //v3.0
		var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
		}

		function MM_findObj(n, d) { //v4.01
		var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
			d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
		if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
		for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
		if(!x && d.getElementById) x=d.getElementById(n); return x;
		}

		function MM_swapImage() { //v3.0
		var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
		if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
		}


			function DropDownChange(dd) {
				if (dd.value != '') {
					if (dd.value.indexOf('[js_exec]') == 0) {
						eval(dd.value.replace('[js_exec]', ''));
					}
					else window.location.href = dd.value;
				}
			}


////SCROLLER
		function move1(whichlayer){
			tlayer=eval(whichlayer)
			if (tlayer.top>0&&tlayer.top<=1){
				tlayer.top=0
				setTimeout("move1(tlayer)",scrollerdelay)
				setTimeout("move2(document.main.document.second)",scrollerdelay)
				return
			}
			if (tlayer.top>=tlayer.document.height*-1){
				tlayer.top -= 1 //5
				setTimeout("move1(tlayer)",scrollerspeed)
			}
			else{
				tlayer.top=parseInt(scrollerheight)
				tlayer.document.write(messages[i])
				tlayer.document.close()
				if (i==messages.length-1)
					i=0
				else
					i++
			}
		}

		function move2(whichlayer){
			tlayer2=eval(whichlayer)
			if (tlayer2.top>0&&tlayer2.top<=1){
				tlayer2.top=0
				setTimeout("move2(tlayer2)",scrollerdelay)
				setTimeout("move1(document.main.document.first)",scrollerdelay)
				return
			}
			if (tlayer2.top>=tlayer2.document.height*-1){
				tlayer2.top-=1
				setTimeout("move2(tlayer2)",scrollerspeed)
			}
			else{
				tlayer2.top=parseInt(scrollerheight)
				tlayer2.document.write(messages[i])
				tlayer2.document.close()
				if (i==messages.length-1)
					i=0
				else
					i++
			}
		}

		function move3(whichdiv){
			tdiv=eval(whichdiv)
			if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=1){
				tdiv.style.top=0+"px"
				if (stopped == 1) {switchButton(1); return;}
				setTimeout("move3(tdiv)",scrollerdelay)
				setTimeout("move4(second2_obj)",scrollerdelay)
				return
			}
			if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
				if (stopped == 1 && parseInt(tdiv.style.top) == 0) {switchButton(1); return;}
				if (stopped == 1 && parseInt(tdiv.style.top) == parseInt(scrollerheight)) {switchButton(1); return;}
				tdiv.style.top=parseInt(tdiv.style.top)-1+"px"
				setTimeout("move3(tdiv)",scrollerspeed)
			}
			else{
				tdiv.style.top=parseInt(scrollerheight)
				tdiv.innerHTML=messages[i]
				itemStatus();
				if (i==messages.length-1)
					i=0
				else
					i++
			}
		}

		function move4(whichdiv){
			tdiv2=eval(whichdiv)
			if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=1){
				tdiv2.style.top=0+"px"
				if (stopped == 1) {switchButton(1); return;}
				setTimeout("move4(tdiv2)",scrollerdelay)
				setTimeout("move3(first2_obj)",scrollerdelay)
				return
			}
			if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
				if (stopped == 1 && parseInt(tdiv2.style.top) == 0) {switchButton(1); return;}
				if (stopped == 1 && parseInt(tdiv2.style.top) == parseInt(scrollerheight)) {switchButton(1); return;}
				tdiv2.style.top=parseInt(tdiv2.style.top)-1+"px"
				setTimeout("move4(second2_obj)",scrollerspeed)
			}
			else{
				tdiv2.style.top=parseInt(scrollerheight)
				tdiv2.innerHTML=messages[i]
				itemStatus();
				if (i==messages.length-1)
					i=0
				else
					i++
			}
		}

		function startscroll(){
			// make sure function doesn't fun twice
			if (running != 0 || messages.length == 1)
				return

			running++

			if (ie||dom){
				first2_obj=ie? first2 : document.getElementById("first2")
				second2_obj=ie? second2 : document.getElementById("second2")
				move3(first2_obj)
				second2_obj.style.top=scrollerheight
				second2_obj.style.visibility='visible'
				switchButton(0);
				document.getElementById("itemStatus").innerHTML = '<span id="itemStatus" style="' + statusStyle + '">1 of ' + messages.length + '</span>';
			}
			else if (document.layers){
				document.main.visibility='show'
				move1(document.main.document.first)
				document.main.document.second.top=parseInt(scrollerheight)+1
				document.main.document.second.visibility='show'
			}
		}

		function itemStatus() {
			document.getElementById("itemStatus").innerHTML = '<span id="itemStatus" style="' + statusStyle + '">' + (i==0?messages.length:i) + ' of ' + messages.length + '</span>';
		}

		function stopScroll() {
			stopped = 1;
			switchButton(2);
		}

		function restartScroll() {
			if (stopped == 0 ) {return;}
			stopped = 0;
			if (scrollForward == 0) {
				if (i==messages.length-1) {
					i=1;
				} else if (i==messages.length-2) {
					i=0;
				} else {
					i=i+2
				}
			}

			move3(first2_obj);
			move4(second2_obj);

			switchButton(0);
			scrollForward = 1;
			stopCompleted = 0;
		}

		function switchButton(what) {
			if (what==0) {
				document.getElementById("startstop").innerHTML = '<a href="javascript:stopScroll();"><img src="Images/pause.gif" namd="pause" border="0" align="middle" alt="Pause Scroll" onMouseOver="scrollIconSwap(\'pause\',this,0);" onMouseOut="scrollIconSwap(\'pause\',this,1);"></a>';
				document.getElementById("nextbutton").innerHTML = '<a href="javascript:nextScroll();"><img src="Images/next.gif" name="next" border="0" align="absmiddle" alt="Next Item" onMouseOver="scrollIconSwap(\'next\',this,0);" onMouseOut="scrollIconSwap(\'next\',this,1);"></a>';
				document.getElementById("backbutton").innerHTML = '<a href="javascript:backScroll();"><img src="Images/prev.gif" name="prev" border="0" align="absmiddle" alt="Previous Item" onMouseOver="scrollIconSwap(\'prev\',this,0);" onMouseOut="scrollIconSwap(\'prev\',this,1);"></a>';
			} else if (what==1) {
				first2_top=parseInt(document.getElementById("first2").style.top)
				second2_top=parseInt(document.getElementById("second2").style.top)
				if ((first2_top != 0 && first2_top != parseInt(scrollerheight)) || (second2_top != 0 && second2_top != parseInt(scrollerheight))) {
					setTimeout("switchButton(1)",50)
					return;
				}
				document.getElementById("startstop").innerHTML = '<a href="javascript:restartScroll();"><img src="Images/play.gif" name="play" border="0" align="middle" alt="Resume Scroll" onMouseOver="scrollIconSwap(\'play\',this,0);" onMouseOut="scrollIconSwap(\'play\',this,1);"></a>';
				document.getElementById("nextbutton").innerHTML = '<a href="javascript:nextScroll();"><img src="Images/next.gif" name="next" border="0" align="absmiddle" alt="Next Item" onMouseOver="scrollIconSwap(\'next\',this,0);" onMouseOut="scrollIconSwap(\'next\',this,1);"></a>';
				document.getElementById("backbutton").innerHTML = '<a href="javascript:backScroll();"><img src="Images/prev.gif" name="prev" border="0" align="absmiddle" alt="Previous Item" onMouseOver="scrollIconSwap(\'prev\',this,0);" onMouseOut="scrollIconSwap(\'prev\',this,1);"></a>';
				stopCompleted = 1;
			} else if (what==2) {
				document.getElementById("startstop").innerHTML = '<img src="Images/play.gif" border="0" align="middle" alt="Please Wait...">';
				document.getElementById("nextbutton").innerHTML = '<img src="Images/next.gif" name="next" border="0" align="absmiddle" alt="Next Item">';
				document.getElementById("backbutton").innerHTML = '<img src="Images/prev.gif" name="prev" border="0" align="absmiddle" alt="Previous Item">';
			}
		}

		function nextScroll() {
			if (stopped == 0) {	stopScroll(); }
			/*
			if (stopCompleted == 0) {
				setTimeout("nextScroll()",50)
				return;
			}
			*/
			if (parseInt(document.getElementById("first2").style.top)==0) {
				topLayer = document.getElementById("first2");
				bottomLayer = document.getElementById("second2");
			} else {
				bottomLayer = document.getElementById("first2");
				topLayer = document.getElementById("second2");
			}
			if (scrollForward == 0) {
				if (i==messages.length-1) {
					i=1;
				} else if (i==messages.length-2) {
					i=0;
				} else {
					i=i+2
				}
			}
			eval(topLayer).innerHTML = (i==0?messages[messages.length-1]:messages[i-1]);
			eval(bottomLayer).innerHTML = messages[i];
			itemStatus();
			scrollForward = 1;
			if (i==messages.length-1) {
				i=0;
			} else {
				i++;
			}
		}

		function backScroll() {
			if (stopped == 0) {	stopScroll(); }
			if (stopCompleted == 0) {
				setTimeout("backScroll()",50)
				return;
			}
			if (parseInt(document.getElementById("first2").style.top)==0) {
				topLayer = document.getElementById("first2");
				bottomLayer = document.getElementById("second2");
			} else {
				bottomLayer = document.getElementById("first2");
				topLayer = document.getElementById("second2");
			}
			if (scrollForward == 1) {
				if (i==0) {
					i=messages.length-2;
				} else if (i==1) {
					i=messages.length-1;
				} else {
					i=i-2
				}
			}
			eval(topLayer).innerHTML = (i==0?messages[messages.length-1]:messages[i-1]);
			eval(bottomLayer).innerHTML = messages[i];
			itemStatus();
			scrollForward = 0;
			if (i==0) {
				i=messages.length-1;
			} else {
				i--;
			}
		}

		function scrollIconSwap(iconImg, what, which) {
			var imgPath = "Images/";
			if (which == 0) {
				what.src = imgPath + iconImg + ".gif";
			} else {
				what.src = imgPath + iconImg + ".gif";
			}
		}
		
function fadeshow2(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"

this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div align="left" id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div align="left" id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+'#E1E0E5'+'"></div><div align="left" id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+ '#E1E0E5' +'"></div></div>')
else
document.write('<div align="left"><img align="left" name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

fadeshow2.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}

fadeshow2.prototype.populateslide=function(picobj, picindex){
var slideHTML='';
if (this.theimages[picindex][1]!="") //if associated link exists for image
	slideHTML+='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img align="center" valign="middle" width="380" height="210" src="'+this.postimages[picindex].src+'" border="'+'0'+'px" title="' + this.theimages[picindex][3] + '">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
if(document.getElementById('c12'))
	if(picindex < 1)
		document.getElementById('c12').innerHTML = '<b>' + this.theimages[picindex+2][3] + '</b>';
	else
		document.getElementById('c12').innerHTML = '<b>' + this.theimages[picindex-1][3] + '</b>';
picobj.innerHTML=slideHTML

}

fadeshow2.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}

fadeshow2.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}

function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"

this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+'#E1E0E5'+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+ '#E1E0E5' +'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}



function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML='';
if (this.theimages[picindex][1]!="") //if associated link exists for image
	slideHTML+='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img align="right" valign="middle" width="353" height="238" src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px" title="' + this.theimages[picindex][3] + '">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
if(document.getElementById('c12'))
	if(picindex < 1)
		document.getElementById('c12').innerHTML = '<b>' + this.theimages[picindex+2][3] + '</b>';
	else
		document.getElementById('c12').innerHTML = '<b>' + this.theimages[picindex-1][3] + '</b>';
picobj.innerHTML=slideHTML

}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}


