//date function
RightNow=new Date();
var themonth;
var month=RightNow.getMonth()+1;
if (month==1) themonth = "January";
if (month==2) themonth = "February";
if (month==3) themonth = "March";
if (month==4) themonth = "April";
if (month==5) themonth = "May";
if (month==6) themonth = "June";
if (month==7) themonth = "July";
if (month==8) themonth = "August";
if (month==9) themonth = "September";
if (month==10) themonth = "October";
if (month==11) themonth = "November";
if (month==12) themonth = "December";

var date=RightNow.getDate();
var year=RightNow.getYear();
var day=RightNow.getDay();
if (year==100){year="2000";}
if (year==101){year="2001";}
if (year==102){year="2002";}
if (year==103){year="2003";}
if (year==104){year="2004";}
if (year==105){year="2005";}


//drop down menu function
function GoUrl(s)
{
	if (s == "no")
	{
		return 0 ;
	}


	var d = s.options[s.selectedIndex].value
	window.top.location.href = d
	s.selectedIndex=0
}





//Start here

function NSresize() {
  if (document.FIX.NSfix.initWindowWidth != window.innerWidth || document.FIX.NSfix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function NSCheck() {
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.FIX == 'undefined'){
      document.FIX = new Object;
    }
    if (typeof document.FIX.FIX_scaleFont == 'undefined') {
      document.FIX.NSfix = new Object;
      document.FIX.NSfix.initWindowWidth = window.innerWidth;
      document.FIX.NSfix.initWindowHeight = window.innerHeight;
    }
    window.onresize = NSresize;
  }
}

NSCheck()



//Ends here



//set up layer call
var isIE, isNS, isNS6, isDOM, lR, sR, vis, invis, myTimeOut, goName;
	if (document.all) {isIE= true;lR="document.all.";sR=".style";vis="visible";invis="hidden";}
	if (document.layers){isNS = true;lR="document.layers.";sR="";vis="show";invis="hide";}
	if (document.getElementById &&!isIE) {isDOM=true;lR = "document.getElementById('";sR = "').style";invis ="hidden";vis = "visible"}
	if (isDOM == true && navigator.appName =="Netscape") isNS6 = true;

var oldwhich = 0;
var x=0;
var layerTimer;


	function layOver(which)
	{
	x=0;
	l = eval(lR + "l" + which + sR);
//	eval("roll('n',"+which+",'On','lN')")
	if (oldwhich != which)
	{
		ol = eval(lR + "l" + oldwhich + sR);
//		eval("roll('n',"+oldwhich+",'Off','lN')")
		ol.visibility = invis;
	}
	l.visibility = vis;
	oldwhich = which;
	clearTimeout(layerTimer);
	return;
	}

//turn off layer and rollover if user is completely off nav
	function stopOver()
	{
		if (x<5) x++;
		else
		{
		ol = eval(lR + "l" + oldwhich + sR);
		ol.visibility = invis;
//		eval("roll('n',"+oldwhich+",'Off','lN')")
		x=0;
		}
	layerTimer = setTimeout("stopOver()",150)
	}
		function startOver()
	{
	x=0
	clearTimeout(layerTimer);
	}


    function changebg(item, color)
{
	if (document.getElementById)
	{
	theone = eval("document.getElementById('"+item+"')")
	theone.style.background = color
	}

}



function pickBrowser()
{
if (isIE) moveLayers()
else {location.reload()}
}

var width
var gap = 155 ;
var toptop = 160 ;
var initial_left = 259
function moveLayers()
{
if (isNS || isNS6) width= window.innerWidth
if (isIE) width= document.body.clientWidth
var in_left = 0 ;
	middle = width/2  ;
	if (width > 800) {
		in_left = initial_left ;
	}
    else
	{
		in_left = initial_left ;
	}



	for (q = 1  ; q < 7 ; q++)
	{
		l = eval(lR + "l" +q+ sR);
		if (width > 743)
		{
			if (isIE) l.pixelLeft = in_left
				else if (isNS6)l.left = in_left
		}
		else
		{
			if (isIE) l.pixelLeft = in_left
				else if (isNS6)l.left = in_left
		}
    }



}


function swap(x,y)
{
        document.images[x].src = eval(y+'.src');
}



function sub_navi (name , max) {
    for ( i = 1; i < max; i++ ) {

      eval( name + i + "_on = new Image") ;
      eval( name + i + "_on.src = 'images/" + name + "_0" + i + ".gif'")
      eval( name + i + "_off = new Image") ;
      eval( name + i + "_off.src = 'images/" + name + "_off_0" + i + ".gif'")

//      eval( name + i + "_on = new Image") ;
//      eval( name + i + "_on.src = '/" + "sample/NUC/thana/nuc" + "/images/" + name + "_on_0" + i + ".gif'")
//      eval( name + i + "_off = new Image") ;
//      eval( name + i + "_off.src = '/" + "sample/NUC/thana/nuc" + "/images/" + name + "_0" + i + ".gif'")

    }
}


var menu = new Array('00', '16', '18', '20', '22', '24', '26');

function main_navi(name, max) {
    for ( i = 1; i < 7; i++ ) {
       eval( name + i + "_on = new Image") ;
       eval( name + i + "_on.src = 'images/top_" + menu[i] + ".gif'")
       eval( name + i + "_off = new Image") ;
       eval( name + i + "_off.src = 'images/top_off_" + menu[i] + ".gif'")
   }

}








function hL(E){
//	if (ie)	{
		while (E.tagName!="TR")
		{E=E.parentElement;}
//	}
//	else {
//		while (E.tagName!="TR")
//		{E=E.parentNode;}
//	}
	E.className = "H";
}


function dL(E){
//	if (ie)
	{
	while (E.tagName!="TR")
	{E=E.parentElement;}
	}
//	else {
//		while (E.tagName!="TR")
//		{E=E.parentNode;}
//	}
	E.className = "D";
}







function hl_me(o) {

	if (o.checked) {

		hL(o) ;
	}
	else
	dL(o) ;

}

function atOnMouseOverLight(o) {

	o.style.backgroundColor = 'D6E7EE';
	o.style.cursor = 'hand';
}

function atOnMouseOutLight(o) {

	o.style.backgroundColor = 'F7F6F4';
}

function Mover(o) {

	o.style.backgroundColor='D9EDF9';
	o.style.cursor='hand';
}

function Mout(o) {

	o.style.backgroundColor='DCDCDC';
}
