function doClick(o)
{
	 var j;
	 var id;
	 var e;
	 var obj=document.getElementById("select"+o);
	 
	 for(var i=1;i<=10;i++){
	   id ="select"+i;
	   j = document.getElementById(id);
	   e = document.getElementById("top_middel"+i);
	   if(id==obj.id){
		 e.className = "middel_select";
	   	 j.className="top_select";
	   }else{
		 e.className = "middel_selectno";
		 j.className="top_selectno";
	   }
	 }
	 }
function getObj(id)

{

return document.getElementById(id);

}

function showSub(id_num,num)

{

for(var i = 0;i <= 9;i++)

{

if(getObj("sMenu_" + id_num + i))

{

if (i == num)

{

getObj("sMenu_" + id_num + i).className = 'selectd';

}

else

{

getObj("sMenu_" + id_num + i).className = 'noselectd';

}

}

if(getObj("sCont_" + id_num + i))

{

getObj("sCont_" + id_num + i).style.display = 'none';

}

}

if(getObj("sCont_" + id_num + num))

{

getObj("sCont_" + id_num + num).style.display = 'block';

}

}

 

function showMenu(obj,id){
 if (id ==1){
   getObj(obj).className="Menuselectd";
   getObj(obj+'1').style.display='block';
   getObj(obj+'2').style.display='none';
 }else{
   getObj(obj).className="Menunoselectd";
   getObj(obj+'1').style.display='none';
   getObj(obj+'2').style.display='block';
 }
}

function chkdiv(divid){
	var chkid=document.getElementById(divid);
	if(chkid != null){return true; }
	else {return false; }
}

var ShadeDiv = {
	objid : null,
	Shade : document.createElement('div'),
	ShadeID : 'Shade',
	width : 500,
	height : 300,
	Position : function(){
		if (!ShadeDiv.objid){
			ShadeDiv.objid = null;
			return;
		}
		var de = document.documentElement;
		var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
		var ch = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
		if (self.pageYOffset) {
			var st = self.pageYOffset;
		} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
			var st = document.documentElement.scrollTop;
		} else if (document.body) {// all other Explorers
			var st = document.body.scrollTop;
		}
		if (window.innerHeight && window.scrollMaxY) {	
			var sh = window.innerHeight + window.scrollMaxY;
		} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
			var sh = document.body.scrollHeight;
		} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
			var sh = document.body.offsetHeight;
		}
		ShadeDiv.Shade.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=60,finishOpacity=100,style=0)';
		ShadeDiv.Shade.style.height = (sh > ch ? sh : ch) + 'px';
		ShadeDiv.Shade.style.width = w + 'px';
		var pos = [], pw;
		pw = ShadeDiv.width;
		pos[0] = (w-pw)/2;
		pos[1] = (ch-(ShadeDiv.height || 300))/2 -100+st;
		window.status="ch:"+ch+"st:"+st+"post[1]:"+pos[1]+"ShadeDiv.clientHeight"+ShadeDiv.objid.clientHeight;
		if (navigator.product && navigator.product == 'Gecko'){
			pw -= 40;
		}
		ShadeDiv.objid.style.width = ShadeDiv.width + 'px';
		ShadeDiv.objid.style.height = ShadeDiv.height + 'px';
		ShadeDiv.objid.style.left = pos[0] + 'px';
		ShadeDiv.objid.style.top = pos[1] + 'px';
		ShadeDiv.Shade.style.display = 'block';
		ShadeDiv.objid.style.display = 'block';
	},
	Show : function(id,w,h){
		ShadeDiv.height = parseInt(h);
		ShadeDiv.width = parseInt(w);
		ShadeDiv.Shade.id = ShadeDiv.ShadeID;
		ShadeDiv.objid = document.getElementById(id);
		document.body.insertBefore(ShadeDiv.Shade,null);
		ShadeDiv.Position();
	},
	Close : function(){
		if (ShadeDiv.objid==null){
			return;
		}
		ShadeDiv.Confirmed();
	},

	Confirmed : function() {
		ShadeDiv.objid.style.display = 'none';
		ShadeDiv.Shade.style.display = 'none';
		document.body.removeChild(ShadeDiv.Shade);
	}

}