var NN4=document.layers?true:false;
var NN6=(navigator.appName == "Netscape")&&!NN4;
var layerRef=NN4?"document":NN6?"":"document.all";
var styleRef=NN4?"":".style";
var suff=NN4?"nn4":"";

function getElementById(anId){
	if (anId)
		if (NN4){
			var objRes=eval("window.document."+anId);
			if (objRes)
				return objRes;
			objRes=eval(document.anchors[anId]);
			if (objRes)
				return objRes;
			for(var i=0;i<document.layers.length;i++)
				if (!objRes){
					objRes=eval(document.layers[i].document.anchors[anId]);
					if (objRes)
						objRes.parent=eval(document.layers[i]);
				}
			return objRes;
		}
		else
			return window.document.getElementById(anId);
	else
		return null;
}
function getCoordsById(anId){
	var obj=getElementById(anId);
	return getCoords(obj)
}
function getCoordsByIdNN4(anId){
	var obj=getElementById(anId);
	return getCoordsNN4(obj)
}
function getCoords(anObj){
	var objRes=new Object();
	objRes.left=objRes.top=objRes.width=objRes.height=0;
	with(objRes){
		width+=anObj.offsetWidth;
		height+=anObj.offsetHeight;
		for(var i=anObj;i!=null;i=i.offsetParent){
			left+=i.offsetLeft;
			top+=i.offsetTop;
		}
	}
	return objRes;
}
function getCoordsNN4(anObj, anEndObj){
	var objRes=new Object();
	objRes.left=objRes.top=objRes.width=objRes.height=0;
	with(objRes){
		left=anObj.x;
		top=anObj.y;
		width=anEndObj.x-left;
		height=anEndObj.y-top;
		if (height==0) height=14;
		if (anObj.parent){
			left+=anObj.parent.x;
			top+=anObj.parent.y;
		}
	}
	return objRes;
}
function getPadCoordsNN4(anObj){
	var objRes=new Object();
	objRes.left=objRes.top=objRes.width=objRes.height=0;
	with(objRes){
		left=anObj.left;
		top=anObj.top;
		width=anObj.clip.width;
		height=anObj.clip.height;
	}
	return objRes;
}

var t=1;
function OverItem(strCurr,strDesc){
	var objPad=getElementById(strDesc+"pad");
	if (strCurr==0){ 
		if (t==1){
			eval("objPad"+styleRef+".display='block'");
			t=0;
		}else{
			eval("objPad"+styleRef+".display='none'");
			t=1;
		}
	}else{
		if (t==0){
			eval("objPad"+styleRef+".display='block'");
			t=1;
		}else{
			eval("objPad"+styleRef+".display='none'");
			t=0;
		}
	}                       
	var objForm=getElementById("form1");
	if (NN4){ eval("objForm"+styleRef+".top=110");}
	if (NN6){ eval("objForm"+styleRef+".top=110");}  
}

var name1,img1;
function key(name,img,imgv){
	name.src=imgv;
	name.press=true;
	name.release=false;
	if (window.name1 && window.img1){
	document.images[name1].src=img1;
	document.images[name1].press=false;
	document.images[name1].release=true;
	}
	name1=name.name;
	img1=img;
}

function ShowPad(flag,strDesc){
	var objPad=getElementById(strDesc+"pad");
	if (objPad.style.display=='none'){ 
		eval("objPad"+styleRef+".display='block'");
	}else{
		eval("objPad"+styleRef+".display='none'");
	}
}                       
   	 
