var jpg = 1;
var gif = 9;
var f = false;
var b = new Array;
var c = new Array;

/********** reload images ************/
function prel(){
	for(i=1;i<=jpg;i++)
	{
		str = 'buttons/b' + i + '_o.gif';
		b[i-1] = new Image();
		b[i-1].src = str;
	}
	/*for(i=1;i<=gif;i++)
	{
		str = 'buttons/b' + i + '_o.jpg';
		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_gif(im){document.images[im].src="buttons/"+im+"_o.jpg";}

function off_gif(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, btn_id, show) {
	if (!show) show='';
	if (show =='show')
		{
		document.getElementById(id).style.display = 'block';
		if (btn_id) document.images[btn_id].src = "buttons/"+btn_id+"_o.gif";
		}
	else if ((document.getElementById(id).style.display == 'block') || (show =='hide'))
		{
		document.getElementById(id).style.display = 'none';
		if (btn_id) document.images[btn_id].src = "buttons/"+btn_id+".gif";
		}
	else
		{
		document.getElementById(id).style.display = 'block';
		if (btn_id) document.images[btn_id].src = "buttons/"+btn_id+"_o.gif";
		}
}

function check(id) {
	if (id.parentNode.parentNode.className=='sel')
		id.parentNode.parentNode.className=''
	else
		id.parentNode.parentNode.className='sel'
}

function main_rolover(id, image, text){
	id.className="sel";
	document.getElementById('menu_image').src="images/big/"+image+".jpg";
	document.getElementById('title').innerHTML = text;
}
function main_rolout(id){
	id.className="";
}

