function $(id) {
    return document.getElementById(id);
}
var select_over=0;
document.onclick = function (p_ev) 
{
	p_ev = (p_ev) ? p_ev : event;
	if(!select_over&&$("show").style.display=="")
	{
		$("show").style.display = "none";
		select_over=0;
	}
}

function setPage(){
		if($("show").style.display=="none"){
			$("show").style.display="";
			}else{
				$("show").style.display="none";
				}
			$("show").onclick = function(){
					$("show").style.display="none";
				}
		}



 function GetXmlHttpObject()
{ 
  var objXMLHttp = null;
  if (window.XMLHttpRequest)
  {
      objXMLHttp=new XMLHttpRequest()
  }
  else if (window.ActiveXObject)
  {
     objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
  }
  return objXMLHttp;
} 


function playvideo2010(videoid)
{	
	var url = "videolist2010.asp?videoid="+videoid;
	 //url +="?videoid="+videoid;
  var xmlHttp; 
  
  xmlHttp = GetXmlHttpObject();
  if (xmlHttp==null)
  {
      alert ("Browser does not support HTTP Request")
      return 0;
  } 

  var distobj = document.getElementById("allvideo2010");
  if(!distobj) return 0;


  xmlHttp.onreadystatechange = function showmsg(){
    if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   { 
		//alert(url);
		//alert(xmlHttp.responseText);
	    distobj.innerHTML = xmlHttp.responseText; 
		xmlHttp = null;
   }   
  }; 

  xmlHttp.open("GET",url,true);
  xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=GB2312");
  xmlHttp.send(null);
}

function scrollDoor(){
	this.value = 0;
}


scrollDoor.prototype = {

	
	sd : function(menus,divs,openClass,closeClass){// two class
		var _this = this;
		if(menus.length != divs.length)
		{
			alert("菜单层数量和内容层数量不一样!");
			return false;
		}				
		for(var i = 0 ; i < menus.length ; i++)
		{	
			_this.$(menus[i]).flag = ++this.value;
			_this.$(menus[i]).value = i;
			_this.$(menus[i]).onmouseover = function(){										
				for(var j = 0 ; j < menus.length ; j++)
				{						
					_this.$(menus[j]).className = closeClass;
					_this.$(divs[j]).style.display = "none";					
				}				
				_this.$(menus[this.value]).className = openClass;	
				_this.$(divs[this.value]).style.display = "block";				
			}
		}
		},
	$ : function(oid){
		if(typeof(oid) == "string")
		return document.getElementById(oid);
		return oid;
	}
}



