function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		s1_menu_01_over = newImage("img/m/s1_menu_01-over.jpg");
		s1_menu_02_over = newImage("img/m/s1_menu_02-over.jpg");
		s1_menu_03_over = newImage("img/m/s1_menu_03-over.jpg");
		s1_menu_04_over = newImage("img/m/s1_menu_04-over.jpg");
		s1_menu_05_over = newImage("img/m/s1_menu_05-over.jpg");
		s1_menu_06_over = newImage("img/m/s1_menu_06-over.jpg");
		s1_menu_07_over = newImage("img/m/s1_menu_07-over.gif");
		ver1_over = newImage("img/s1de_o.gif");
		ver2_over = newImage("img/s1en_o.gif");
		preloadFlag = true;
	}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

var tS=0;
var tSt;

/*
function setTimeMenu1(t,m) {
	if(m) {
		tSt=setTimeout("MM_showHideLayers('submenu1','','hide')",800);
		tS=1;
	} else {
		clearTimeout(tSt);
		MM_showHideLayers('submenu1','','show');
		tS=0;
	}
}
*/


function setTimeMenu(t,m) {
	if(m) {
		tSt=setTimeout("MM_showHideLayers('submenu','','hide')",800);
		tS=1;
	} else {
		clearTimeout(tSt);
		MM_showHideLayers('submenu','','show');
		tS=0;
	}
}


var tS_1=0;
var tSt_1;

function setTimeMenu1(t,m) {
if(m) {
tSt_1=setTimeout("MM_showHideLayers('submenu1','','hide')",800);
tS_1=1
} else {
clearTimeout(tSt_1);
MM_showHideLayers('submenu1','','show')
tS_1=0;
}
}






function tmt_DivAlign(theDiv,h,v,hPx,vPx,hPxf){
	var obj,fun,dw,dh,lw,lh,x,y;
	fun = (document.getElementById) ? "document.getElementById" : "MM_findObj";
	obj = (document.getElementById) ? document.getElementById(theDiv) : MM_findObj(theDiv);
	if(obj){if(document.all){
	dw = document.body.clientWidth;dh = document.body.clientHeight;}
	else{dw = innerWidth;dh = innerHeight;}
	if(document.layers){lw = obj.clip.width;lh = obj.clip.height;}else{
	lw = obj.style.width.replace("px","");lh = obj.style.height.replace("px","");}
	x = (document.layers) ? ".left" : ".style.left";
	y = (document.layers) ? ".top" : ".style.top";
	if(h == "l"){eval(fun+"('"+theDiv+"')"+x+"="+hPx);}
	if(h == "c"){eval(fun+"('"+theDiv+"')"+x+"=("+dw+"/2-"+lw+"/2)"+hPxf);}
	if(h == "r"){eval(fun+"('"+theDiv+"')"+x+"="+dw+"-"+lw+"-"+hPx);}
	if(v == "t"){eval(fun+"('"+theDiv+"')"+y+"="+vPx);}
	if(v == "m"){eval(fun+"('"+theDiv+"')"+y+"="+dh+"/2-"+lh+"/2");}
	if(v == "b"){eval(fun+"('"+theDiv+"')"+y+"="+dh+"-"+lh+"-"+vPx);}}
	return;
}

MM_reloadPage(true);

