// display & hide div
var current = "1";
function pageSwitch(id)
{
	var div = document.getElementById("page"+id);
	var curDiv = document.getElementById("page"+current);
	curDiv.style.display = "none";
	div.style.display = "block";
    current = id;
}

function popUp()
{
	window.open('news.html','newWindow','width=780, height=600, scrollbars=yes');
}

// close banner
function close()
{
	var ads = document.getElementById("div");
	ads.style.display = "none";
}


// glider code here

var cnt=0, cnt2=0;
function nextImg()
{  
 document.getElementById('new').scrollLeft+=10;
 cnt--;

 if (cnt>0)
 {
   setTimeout('nextImg()',15);
   document.myform.HdnStatus.value='off';
 }
 else
 {
   document.myform.HdnStatus.value='on';
 }

}

function nextImg2()
{  
 document.getElementById('new').scrollLeft-=10;
 cnt2--;

 if (cnt2>0)
 {
   setTimeout('nextImg2()',15);
   document.myform.HdnStatus.value='off';
 }
 else
 {
   document.myform.HdnStatus.value='on';
 }

}


function nextCalc()
{  
 if(document.myform.HdnStatus.value=='on' && document.myform.HdnCounter.value != 3)
 {
     document.myform.HdnCounter.value++;
     cnt = 69;  
     cnt2=0;
     nextImg(); 
 } 
 else
 {
	 alert('This is the last page!');
 }
}


function prevCalc()
{  
 if(document.myform.HdnStatus.value=='on' && document.myform.HdnCounter.value != 1)
 {
	 document.myform.HdnCounter.value--;
	 cnt2 = 69; 
	 cnt=0;
	 nextImg2();
 }
 else
 {
	 alert('This is the first page!');
 }
}


function mouseover(img_name, img_src)
{
   document[img_name].src = img_src;
}

function mouseout(img_name, img_src)
{
   document[img_name].src = img_src;
}
