var rotate_delay = 5000; // delay in milliseconds (5000 = 5 secs)
current = 0;
function next() {
if (document.slideform.slide[current+1]) {
document.imagesz.show.src = document.slideform.slide[current+1].value;
document.slideform.slide.selectedIndex = ++current;
   }
else first();
}
function previous() {
if (current-1 >= 0) {
document.images.show.src = document.slideform.slide[current-1].value;
document.slideform.slide.selectedIndex = --current;
   }
else last();
}
function first() {
current = 0;
document.images.show.src = document.slideform.slide[0].value;
document.slideform.slide.selectedIndex = 0;
}
function last() {
current = document.slideform.slide.length-1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
}
function ap(text) {
document.slideform.slidebutton.value = (text == "Stop") ? "Start" : "Stop";
rotate();
}
function change() {
current = document.slideform.slide.selectedIndex;
document.images.show.src = document.slideform.slide[current].value;
}
function rotate() {
if (document.slideform.slidebutton.value == "Stop") {
current = (current == document.slideform.slide.length-1) ? 0 : current+1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
window.setTimeout("rotate()", rotate_delay);
   }
}



function goto(link){
window.parent.location = link
}

function displayToggle(count, val)
{
cnt = count.value
for( i=1; i<=cnt;i++) 
	{
	document.getElementById("divFAQ"+i).style.display = 'none' 
	}
	if (val.style.display == 'none')
		{val.style.display = ''; }
	else
		{val.style.display = 'none' }
}


function checkWhich(evt) {
var isNav4, isIE4
if (parseInt(navigator.appVersion.charAt(0)) >=4) {
	var isNav4=(navigator.appName=="Netscape") ? true : false
	var isIE4=(navigator.appName.indexOf("Microsoft"!=-1)) ? true : false
}
var theKey
if (isNav4) {
	theKey=evt.which
} else if (isIE4) {
	theKey=window.event.keyCode
	} //else
	

return theKey
}

function changeField(str, size, evt) {
var strKey
strKey=checkWhich(evt)
alert(strKey)
if ((str.value.length==size) && (strKey>47) && (strKey<58)) {
for (var i=0; i<form1.elements.length; i++) {
if (form1.elements[i].value==str.value) {
	if ((strKey==9) && (str.value.length==0)) {
		form1.elements[i].focus()
		break
	 }else {
	form1.elements[i+1].focus()
	break }
	 } //if
	} //for
	}
}
  
function openme(x) 
{
window.open(x,'text','toolbar=no,menubar=yes,location=no,directories=no,status=no,scrollbars=yes,scrolling=yes,resizable=yes,copyhistory=no,width=625,height=600, top=0,left=0'); 
}

function newWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
win.focus() 
}
     

var rotate_delay = 5000; // delay in milliseconds (5000 = 5 secs)
current = 0;
function next() {
if (document.slideform.slide[current+1]) {
document.images.show.src = document.slideform.slide[current+1].value;
document.slideform.slide.selectedIndex = ++current;
   }
else first();
}
function previous() {
if (current-1 >= 0) {
document.images.show.src = document.slideform.slide[current-1].value;
document.slideform.slide.selectedIndex = --current;
   }
else last();
}
function first() {
current = 0;
document.images.show.src = document.slideform.slide[0].value;
document.slideform.slide.selectedIndex = 0;
}
function last() {
current = document.slideform.slide.length-1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
}

function change() {
current = document.slideform.slide.selectedIndex;
document.images.show.src = document.slideform.slide[current].value;
}
    
function adWin(loc)
{
	sBrowser = navigator.appName;
	sVersion = parseInt(navigator.appVersion);
	sDetail = navigator.userAgent;
	sBrowVer = null;
	y = (screen.availHeight)/2.5;
	x = (screen.availWidth)/4;
	
	//=============================================================
	if (sBrowser == "Netscape")
	{
		if (sVersion == 2)
		{
			sBrowVer = "Net2"
		}
		else if (sVersion >= 3 && sVersion < 4)
		{
			sBrowVer = "Net3"
		}
		else if (sVersion >= 4)
		{
			sBrowVer = "Net4"
		}
	}
	else if (sBrowser == "Microsoft Internet Explorer")
	{
		if (sVersion >= 2 && sVersion <= 3)
		{
			if (sDetail.indexOf("3.") != -1)
			{
				sBrowVer = "IE3"
			}
			else
			{
				sBrowVer = "IE2"
			}
		}
		else if (sVersion >= 4)
		{
			sBrowVer = "IE4"
		}
	}
//========================================================
	  if (sBrowVer =="Net2" ||sBrowVer=="Net3"){NewWindow=window.open("", "adWIN","height=300,width=400,screenX="+x+",left="+x+",screenY="+y+",top="+y+",alwaysRaised=0,dependent=1,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0");
		NewWindow.location.href = loc;
		if(sBrowVer == "Net3")
		{
			NewWindow.focus()
		}
	}
//=======================================================
	  if(sBrowVer=="Net4"){NewWindow=window.open("", "adWIN","height=300,width=400,screenX="+x+",left="+x+",screenY="+y+",top="+y+",alwaysRaised=0,dependent=1,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0");
		NewWindow.location.href = loc;
		NewWindow.focus()
	}
//========================================================
	  if(sBrowVer=="IE3"){win=window.open('','adWIN','width=400,height=300,screenX="+x+",left="+x+",screenY="+y+",top="+y+",dependent=1,directories=0,fullscreen=0,location=0,menubar=0,channelmode=0,resizable=1,scrollbars=0,status=0,toolbar=0"');
  		if (win != null)
		{
     		if (win.opener == null)
			{
        		win.opener = self;
     		}
    		win.location.href = loc;
   		}
	}
//=======================================================
	  if(sBrowVer=="IE4"){NewWindow=  window.open("", "adWIN","height=300,width=400,screenX="+x+",left="+x+",screenY="+y+",top="+y+",dependent=1,directories=0,fullscreen=0,location=0,menubar=0,channelmode=0,resizable=1,scrollbars=0,status=0,toolbar = 0");  
	
		NewWindow.location.href=  loc; } if(sBrowVer==null){NewWindow=window.open("", "adWIN","height=250,width=400,screenX="+x+",left="+x+",screenY="+y+",top="+y+",dependent=1,directories=0,fullscreen=0,location=0,menubar=0,channelmode=0,resizable=1,scrollbars=0,status=0,toolbar=0");
		NewWindow.location.href = loc;
	}
	return true
}
