var jpg = 10;
var gif = 10;
var f = false;
var b = new Array;
var c = new Array;


/********** min width ************/
if (!popup) var popup=false;
if (!popup)
{
var d = document;
var winIE = (navigator.userAgent.indexOf('Opera')==-1 && (d.getElementById && d.documentElement.behaviorUrns)) ? true : false;
function bodySize(){
if(winIE && d.documentElement.clientWidth) {
sObj = d.getElementsByTagName('body')[0].style;
sObj.width = (d.documentElement.clientWidth<1000) ? '1000px' : '100%';
}
}
function init(){
if(winIE) { bodySize(); }
}
onload = init;
if(winIE) { onresize = bodySize; }
}


/********** reload images ************/
function prel(){
	for(i=1;i<=jpg;i++)
	{
		str = 'buttons/b' + i + '_o.jpg';
		b[i-1] = new Image();
		b[i-1].src = str;
	}
	for(i=1;i<=gif;i++)
	{
		str = 'buttons/b' + i + '_o.gif';
		c[i-1] = new Image();
		c[i-1].src = str;
	}
}

function on(im){document.images[im].src="buttons/"+im+"_o.gif";}

function off(im){document.images[im].src = "buttons/"+im+".gif";}

function on_jpg(im){document.images[im].src="buttons/"+im+"_o.jpg";}

function off_jpg(im){document.images[im].src = "buttons/"+im+".jpg";}

/********** change classname ***********/
function over(id) {document.getElementById(id).className="hoverTD"}
function out(id) {document.getElementById(id).className="normalTD"}

/********** Jump Select **********/
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


/********** Show block **********/
/*function show(id) {
	if (document.getElementById(id).style.display == 'block')
		document.getElementById(id).style.display = 'none';
	else
		document.getElementById(id).style.display = 'block';
}
*/

function show(id) {
	if (document.getElementById(id).style.display != 'block')
		document.getElementById(id).style.display = 'block';
}

function hide(id) {
	if (document.getElementById(id).style.display != 'none')
		document.getElementById(id).style.display = 'none';
}



/************* Open Page *************/
function opendocs(url, width, height)
{
window.open(url, "_blank", "toolbar=0,status=1,location=0,menubar=0,directories=0,scrollbars,resizeable,width="+width+",height="+height);

}

/*************** menu ************/
function show_menu (id) {
	document.getElementById("link"+id).className = 'sel';
	document.getElementById('lev2').style.visibility = 'visible';
	document.getElementById("menu"+id).style.display = 'block';
}
function hide_menu() {
	document.getElementById('lev2').style.visibility = 'hidden';
	for(i=1;i<=7;i++)
	{
		document.getElementById("link"+i).className = '';
		document.getElementById("menu"+i).style.display = 'none';
	}
}


