function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
            img.outerHTML = strNewHTML
            i = i-1
         }
      }
   }    
}

function reducedfocus(){
	document.getElementById('reducedemail').style.display="none";
	document.getElementById('emailfield').focus();
}


function printflash(swf,w,h,div){
		var so = new SWFObject(swf, "flash-animations", w, h, "8", "#ffffff");
		so.addParam("wmode", "transparent");
		so.write(div);	
}

function quickref(){
	id=document.getElementById('refid').value;
	if(id!=''){	window.location.href=id; }
}

left=0;
spd=Array(30,30,20,20,10);
cnt=0;
act='';
i=Array();

function next(){
	if(act==''){ timer=setTimeout(function(){ move(0,'next') },1); act='move'; }
}

function prev(){
	if(act==''){ timer=setTimeout(function(){ move(0,'prev') },1); act='move'; }
}


function move(c,d){
	
	t=document.getElementById("gth");
	
	if(d=='next'){
		left=left-spd[c];
		t.style.left=left+"px";
		c++;
		if(c<=4){
			timer=setTimeout(function(){ move(c,'next') },10);
		}else{
			act='';	
		}
	}else{
		left=left+spd[c];
		t.style.left=left+"px";
		c++;
		if(c<=4){
			timer=setTimeout(function(){ move(c,'prev') },10);
		}else{
			act='';	
		}
	}
	
	check();
	
}

function check(){

	n=document.getElementById("gn");
	p=document.getElementById("gp");
	no=document.getElementById("gno");
	po=document.getElementById("gpo");
	
	if(left==0){
		p.style.display="none";
		po.style.display="block";
	}else{
		p.style.display="block";
		po.style.display="none";
	}
	
	if(left==maxleft){
		n.style.display="none";
		no.style.display="block";
	}else{
		n.style.display="block";
		no.style.display="none";
	}
	
}

function fadecheck(x){
	
	document.getElementById("gm1").src=i[x].src;
	
	b=document.getElementById("gf1");
	f=document.getElementById("gf2");
	
	v=10;
	b.style.opacity = v/10;
	b.style.filter = 'alpha(opacity=' + v*10 + ')';
	
	v=0;
	f.style.opacity = v/10;
	f.style.filter = 'alpha(opacity=' + v*10 + ')';
}

function loadimg(x){
	document.getElementById("gm2").src=i[x].src;
	tmr=setTimeout(function(){ fade(10,0,x) },50);
}

function fade(o,i,x){
	
	o=o-2;
	i=i+2;
	
	b=document.getElementById("gf1");
	f=document.getElementById("gf2");
	
	b.style.opacity = o/10;
	b.style.filter = 'alpha(opacity=' + o*10 + ')';
	
	f.style.opacity = i/10;
	f.style.filter = 'alpha(opacity=' + i*10 + ')';
	
	if(i!=10){
		tmr=setTimeout(function(){ fade(o,i,x) },50);
	}else{
		fadecheck(x);
	}
	
}

