sfHover = function() { 
	var sfEls = document.getElementById("nav").getElementsByTagName("LI"); 
 	for (var i=0; i<sfEls.length; i++) { 
 		sfEls[i].onmouseover=function() { 
   			this.className+=" sfhover";
   		}
  		sfEls[i].onmouseout=function() { 
   			this.className=this.className.replace(new RegExp(" sfhover\\b"), "a");
   		}
  	}
};


var jsInclude1 = '<script language="JavaScript" src="/v/js/marqueeclass.js"><\/script>';
//document.write(jsInclude1);

var gnamespace = function(){}
gnamespace.prototype.register = function(fullNS)
{
	// 将命名空间切成N部分, 比如Grandsoft、GEA等
	var nsArray = fullNS.split('.');
	var sEval = "";
	var sNS = "";
	for (var i = 0; i < nsArray.length; i++)
	{
		if (i != 0) sNS += ".";
		sNS += nsArray[i];
		// 依次创建构造命名空间对象（假如不存在的话）的语句
		// 比如先创建Grandsoft，然后创建Grandsoft.GEA，依次下去
		sEval += "if (typeof(" + sNS + ") == 'undefined') " + sNS + " = new Object();"
	}
	if (sEval != "") eval(sEval);
}

var g = {};

g.o_event = {
	//注册事件方法
	setListener : function (sobj,sEvent,sfunction)   
	{
		this.iname = sobj;
		this.iEvent = sEvent;	
		this.iprocess = sfunction;
		this.set = function()   
		{ 
			var eobj = g.o_element.$(this.iname); 			
			if(eobj.attachEvent)
			{
				eobj.attachEvent("on"+this.iEvent,this.iprocess);  	
				//eobj.attachEvent("onpropertychange",this.iprocess); 
			}
			else if(eobj.addEventListener){
				eobj.addEventListener(this.iEvent, this.iprocess, false);
			}	
		};
		this.set();
	},
	stopPropagation : function (e)
	{  
		if (!e) e = window.event;  
		if (e.stopPropagation){
			e.stopPropagation();  
		}
		else {  
			e.cancelBubble = true;  
		} 
	}
};

g.o_element = {
	$ : function (ee, pFrame)
	{
		if (!pFrame) { pFrame = self; }
		var xx=null;
		if(typeof(ee)=="string" )
		{ 
			if (ee !="") xx = pFrame.document.getElementById(ee); 
		}
		else if(typeof(ee) == "object"){ xx = ee; }
		else { return null; }
		
		if(xx) { return xx; }
		else { return null; }
	},
	value : function (eobj)
	{
		if(this.$(eobj)!=null)
		{
			if( this.$(eobj).tagName.toLowerCase().indexOf("input") >=0)
			{ return this.$(eobj).value; }
			else if( this.$(eobj).tagName.toLowerCase().indexOf("select") >=0)
			{ return this.$(eobj).value; }
			else
			{ return ""; }
		}
		else
		{ return ""; }
	},
	setValue : function (eobj, pValue, pFrame)
	{ 
		if (pValue == null) { pValue = ""; }
		if (!pFrame) { pFrame = self; }
		var tObj = this.$(eobj, pFrame)
		if(tObj!=null)
		{ 
			if( tObj.tagName.toLowerCase().indexOf("input") >=0 )
			{ tObj.value = pValue ; }
			else if( tObj.tagName.toLowerCase().indexOf("select") >=0 )
			{ tObj.selectedValue = pValue ; }
			else
			{
				tObj.innerHTML = pValue.toString();
				tObj.style.display = "";			
			}
		}		
	},
	addElement : function (ee, aname, etype)
	{
		if(etype == null || etype == ""){ etype= "span"; }
		if(this.$(ee)!=null)
		{ 
			if (this.$(aname)!=null)
			{
				var tempE = this.$(aname);
				this.delElement(this.$(aname));
				this.$(ee).appendChild(tempE)	;
			}
			else
			{
				var x=this.$(ee);
				var newel,newtext;
				newel=document.createElement(etype);
				newel.setAttribute("id",aname);
				newel.setAttribute("name",aname);
				x.appendChild(newel);
			}
		}		
	},
	delElement : function (aname)
	{
		if(this.$(aname)!=null)
		{
			this.$(aname).parentNode.removeChild(this.$(aname));
		}
	},
	show : function (eobj)
	{
		var eobj1 = this.$(eobj);
		if(eobj1)
		{
			eobj1.style.display = "";
		}
	},
	hidden : function (eobj)
	{
		var eobj1 = this.$(eobj);
		if(eobj1)
		{
			eobj1.style.display = "none"; 
		}
	},
	display : function (eobj)
	{
		var eobj1 = this.$(eobj);
		if(eobj1)
		{
			if (eobj1.style.display == "none") {eobj1.style.display = "";}
			else  {eobj1.style.display = "none";}
		}
	},
	setClassName : function (pobj, pClassName)
	{
		var eobj1 = this.$(pobj);
		if(eobj1) { eobj1.className = pClassName; }
	},
	switchClassName : function (pobj, pClassName1, pClassName2)
	{
		var eobj1 = this.$(pobj);
		if(eobj1)
		{ 
			if(eobj1.className == pClassName1 ) { eobj1.className = pClassName2; }
			else { eobj1.className = pClassName1; }
		}
	},
	collapse : function (pobj, pPrefix)
	{
		var eobj1 = this.$(pobj);
		if (eobj1)
		{
			this.collapseAll(pPrefix);
			eobj1.style.display = ''; 
		} 
	},
	collapseAll : function (pPrefix)
	{
		for (var i=0; i<20; i++)
		{
			var eobj1 = this.$(pPrefix + i.toString());
			if (eobj1) { eobj1.style.display = 'none'; }
		}
	},
	expandAll : function (pPrefix)
	{
		for (var i=0; i<20; i++)
		{
			var eobj1 = this.$(pPrefix + i.toString());
			if (eobj1) { eobj1.style.display = ''; }
		}
	},
	goTab : function (sindex,topPrefix,conPrefix,opencssname,closecssname)
	{
		for(var i=0; i<10; i++)
		{
			var tcon = this.$( conPrefix + i );
			var ttop = this.$( topPrefix + i );
			if(tcon)
			{
				if(sindex == i)
				{
					tcon.style.display = "block";
					if (typeof(opencssname) == "string" && opencssname !="")
					{ ttop.className = opencssname; }
				}
				else
				{
					tcon.style.display = "none";
					if (typeof(closecssname) == "string" && closecssname !="")
					{ ttop.className = closecssname; }
				}
			}
		}
	},
	cancleInnerCheckbox : function (pOutObj)
	{
		if (this.$(pOutObj))
		{
			var tcks = this.$(pOutObj).getElementsByTagName("INPUT");
			for (var i=0; i < tcks.length; i++)
			{
				tcks[i].checked = false;	
			}
		}
	},
	//复选框控制显示
	checkboxDisplay : function (pCheckboxObj, pTargetObj)
	{
		var eobj1 = this.$(pCheckboxObj);
		if(eobj1)
		{
			if (eobj1.checked == true) { this.$(pTargetObj).style.display = "";}
			else  { this.$(pTargetObj).style.display = "none"; }
		}	
	},
	//复选框反转控制显示
	checkboxReverseDisplay : function (pCheckboxObj, pTargetObj)
	{
		var eobj1 = this.$(pCheckboxObj);
		if(eobj1)
		{
			if (eobj1.checked == true) { this.$(pTargetObj).style.display = "none";}
			else  { this.$(pTargetObj).style.display = ""; }
		}	
	},
	//取得所有包容的input的值
	getDescendantValue : function( pOutObj )
	{
		var rValue = "";
		if ( this.$(pOutObj) )
		{
			var tcks = this.$(pOutObj).getElementsByTagName("INPUT");
			for ( var i=0; i < tcks.length; i++ )
			{
				if ( tcks[i].checked == true && tcks[i].value != "" )
				{ 
					rValue = rValue + tcks[i].value + "," ;
				}				
			}
			rValue = rValue.substr(0,rValue.length-1);
		}
		return rValue ;
	},
	checkAllByForm : function ( pForm )
	{
		if (this.$(pForm).elements)
		{
			for(i=0;i<this.$(pForm).elements.length;i++)
			{
				if(this.$(pForm).elements[i].checked)
				{
					this.$(pForm).elements[i].checked = false;
					this.$(pForm).CheckAll.checked = false;
				}
				else{
					this.$(pForm).elements[i].checked = true;
					this.$(pForm).CheckAll.checked = true;
				}
			}	
		}		
	},
	setMouseOverStyle : function (pNodes, pOverClassName)
	{
		if (pNodes.length)
		{
			for (var i=0; i < pNodes.length; i++)
			{
				this.setMouseOverStyle(pNodes[i], pOverClassName);					
			}
		}
		else if (pNodes.style) 
		{
			pNodes.onmouseover = function() {
				if (!pOverClassName) { this.style.backgroundColor = "#CCCCCC"; }
				else { this.className += pOverClassName; }
			};
			pNodes.onmouseout = function() {
				if (!pOverClassName) { this.style.backgroundColor = ""; }
				else { this.className = this.className.replace(pOverClassName, ""); }
			};	
		}
	},
	getPosition : function (pObj)
	{
		var tPosition;
		var textField = this.$(pObj);
		if(window.getSelection) tPosition = textField.selectionStart;		
		else tPosition = document.selection.createRange();
		return tPosition;
	},
	getSelectedText : function (pObj)
	{
		var selectedText;
		var textField = this.$(pObj);
		if(window.getSelection) selectedText = this.getTextFieldSelection(textField);		
		else selectedText = document.selection.createRange().text;
		return selectedText;
	},
	getTextFieldSelection : function (e)
	{
		//var oEvent=arguments.callee.caller.arguments[0];
		if(e.selectionStart != undefined && e.selectionEnd != undefined)
		return e.value.substring(e.selectionStart, e.selectionEnd);
		else return "";
	}
};

g.o_g = {
	element : g.o_element ,
	trim : function (str1)
	{
		return str1.replace(/(^\s*)|(\s*$)/g,"");
	},
	IsQName : function (w)
	{
		var str = "abcdefghijklmnopqrstuvwxyz_1234567890"
		 w = w.toLowerCase();
		var j = 0;
		for(i=0;i < w.length;i++){
			if(str.indexOf(w.substr(i,1)) != -1){
				j++;
			}
		}
		return j;
	},
	// 返回函数指定的逗号分隔的参数列表字串
	stringFromArguments : function (iarguments,istart,iend)
	{
		if (!iarguments){return null;}
		var request1 = "";
		if (parseInt(istart) < 0||istart == null) istart = 0;
		if(parseInt(iend) > iarguments.length ||iend == null) iend = iarguments.length;
		for (var i = istart;i<iend;i++)
		{
			request1 += "\""+iarguments[i].toString() + "\",";
		}
		if(request1 != "")
		{
			request1 = request1.substring(0,request1.length-1)	
		}
		return request1;
	},
	// 返回函数指定参数的用&连接的字串，
	urlStringFromArguments : function (iarguments,istart,iend)
	{
		var request1 = "";
		if (parseInt(istart) < 0||istart == null) istart = 0;
		if(parseInt(iend) > iarguments.length ||iend == null) iend = iarguments.length;
		for (var i = istart;i<iend;i++)
		{
			request1 += "&"+iarguments[i];
		}
		if(request1 != "")
		{
			request1 = request1.substring(1,request1.length)	
		}
		return request1;
	},
	//过滤重复字串,只留下一个,返两边不带分号的
	deleteSameString : function (ss)
	{
		var r="";
		var parray = ss.split(",");
		
		for(var qq=0;qq<parray.length;qq++)
		{
			var isame = false;
			for (var tt = qq+1;tt<parray.length;tt++)
			{
				if(parray[qq] == parray[tt])
				{	isame = true;	}
			}
			if (isame == false&&parray[qq]!="")
			{	r = r + parray[qq] + ",";	}
		}
		if(r!=""){	return r.substring(0,r.length - 1);	}
		else {	return r;	}
	},
	resizeImage : function (ImgD,iwidth,iheight)
	{ 
		 var image=new Image(); 
		 image.src=ImgD.src; 
		 if(image.width>0 && image.height>0)
		 { 
			if(image.width/image.height>= iwidth/iheight)
			{ 
			   if(image.width>iwidth)
			   { 
				   ImgD.width=iwidth; 
				   ImgD.height=(image.height*iwidth)/image.width; 
			   }
			   else
			   { 
					ImgD.width=iwidth; 
					ImgD.height=(image.height*iwidth)/image.width; 
				} 
				ImgD.alt=image.width+"×"+image.height; 
			} 
			else
			{ 
				if(image.height>iheight)
				{ 
					ImgD.height=iheight; 
					ImgD.width=(image.width*iheight)/image.height; 
				}
				else
				{ 
					ImgD.height=iheight; 
					ImgD.width=(image.width*iheight)/image.height; 
				} 
				ImgD.alt=image.width + "*" + image.height; 
			}
			ImgD.style.cursor= "pointer";
		} 
	}
	
};


g.o_page = {
	element : g.o_element ,
	getQueryString : function (name)
	{
		var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");
		if (reg.test(location.href))
		return unescape(RegExp.$2.replace(/\+/g, " "));
		return "";
	},
	getPath : function ()
	{
		var sName;		
		sName = location.pathname;		
		return 	sName;		
	},	
	getUrl : function ()
	{
		var sName;		
		sName = location.href;		
		return 	sName;		
	},
	getPageName : function ()
	{
		var sFullUrl,sName;		
		sFullUrl = location.pathname;		
		sName = sFullUrl.substr(sFullUrl.lastIndexOf("/")+1);
		return 	sName;		
	},
	parseUrl : function (pUrl, pParams, pType)
	{
		var sCurrentFileName,sCurrentParams;
		if ( pUrl.indexOf("?") >=0 )
		{
			sCurrentFileName = pUrl.substr(0,pUrl.indexOf("?"));
			sCurrentParams = pUrl.substr(pUrl.indexOf("?")+1);
		}
		else
		{
			sCurrentFileName = pUrl ;
			sCurrentParams = "";
		}
		
		if ( pParams!=null && pParams != "")
		{
			pParams = pParams.replace("|","&");
			pParams = pParams.replace("$","&");
			var sArray;
			sArray = pParams.split("&");
			
			if(sCurrentParams != "")
			{
				sCurrentParams = "&" + sCurrentParams ;
				for( var i = 0; i < sArray.length; i++)
				{
					var sName;
					sName = sArray[i].substr(0,sArray[i].indexOf("="));
					if( sName == "" && sArray[i] != ""){ sName = sArray[i] + "="; }
					if( sName != "" )
					{				
						var reg = new RegExp("[&]+" + sName + "[^&]*","i");
						sCurrentParams = sCurrentParams.replace(reg,"");
					}
				}
			}

			if ( pType != null && pType.toLowerCase() == "replace")
			{ 
				for( var i = 0; i<sArray.length; i++)
				{
					if( sArray[i]!="")
					{
						sCurrentParams = sCurrentParams + "&" + sArray[i];
					}
				}
				sCurrentParams = sCurrentParams.replace("&&","&");
			}						
		}
		sCurrentFileName = sCurrentFileName + "?" + sCurrentParams;
		sCurrentFileName = sCurrentFileName.replace("?&","?");
		
		return sCurrentFileName;
	},
	replaceParamsUrl : function (pUrl, pParams)
	{
		return this.parseUrl(pUrl, pParams,"replace");	
	},
	removeParamsUrl : function (pUrl, pParams)
	{
		return this.parseUrl(pUrl, pParams,"");	
	},
	parseCurrentUrl : function (pParams,pType)
	{
		var tUrl
		tUrl = location.href;
		return this.parseUrl(tUrl, pParams, pType)
	},
	replaceParamsCurrentUrl : function (pParams)
	{
		return this.parseCurrentUrl(pParams,"replace");	
	},
	removeParamsCurrentUrl : function (pParams)
	{
		return this.parseCurrentUrl(pParams,"");	
	},
	goRemoveParamsCurrentUrl : function (pParams, pTarget)
	{	
		var tUrl = this.removeParamsCurrentUrl(pParams);
		this.goUrl(tUrl, pTarget);
	},
	goReplaceParamsCurrentUrl : function (pParams, pTarget)
	{	
		var tUrl = this.replaceParamsCurrentUrl(pParams);
		this.goUrl(tUrl, pTarget);
	},
	goUrl : function (pUrl, pTarget)
	{	
		if (pTarget==null) { location.href = pUrl; }
		else if (pTarget.toLowerCase()=="top") { top.location.href = pUrl; }
		else if (pTarget.toLowerCase()=="blank" || pTarget.toLowerCase()=="new") { window.open(pUrl); }
		else { location.href = pUrl; }
	},
	turn : function (sselectobj,surl,sobj)
	{
		if (sobj == "")
		{ window.location.href = surl + sselectobj.value; }
		else if (this.element.$(sobj))
		{ XHRGetCommon(surl + sselectobj.value,sobj,null); }
	},
	turnByDorpList : function (pThis, pDropList)
	{
		if (this.element.$(pDropList))
		{
			var sParam = pDropList +"=" + this.element.$(pDropList).value;
			var otherParams = "";//"&Action=";
			location.href = this.replaceParamsCurrentUrl(sParam + otherParams);
		}
	},
	turnByDorpListValue : function (pDropList)
	{
		if (this.element.$(pDropList))
		{
			location.href = this.element.$(pDropList).value;
		}
	},
	addFavorite : function (stitle,surl,sptitle)
	{
		if (stitle == null) { stitle = document.title; }
		if (sptitle!=null) { stitle = sptitle;}
		if (surl == null) { surl = location.href; }
		if (window.sidebar) {
		window.sidebar.addPanel(stitle,surl,sptitle);
		} else if( document.all ) {
		window.external.AddFavorite(surl,stitle);
		} else if( window.opera && window.print ) {
		return true;}	
	},
	setHome : function (obj,vrl)
	{ 
		if (this.element.$(obj) == null){ return; }
		obj = this.element.$(obj); 
		if (vrl == null || vrl == ""){		vrl = location.href;	}
		try{
			obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
		}
		catch(e){
			if(window.netscape) {
				try {
					netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
				}
				catch (e) {
					alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可。");
				}
				var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
				prefs.setCharPref('browser.startup.homepage',vrl);
			 }
		}
	},
	//返回四个尺寸值,分别是页面宽/高/窗口宽/高
	dimension : function ()
	{
		var xScroll, yScroll;
		if (document.body.scrollHeight > document.body.offsetHeight)
		{
			xScroll = document.body.scrollWidth;
			yScroll = document.body.scrollHeight;
		}
		else if (window.innerHeight && window.scrollMaxY)
		{
			xScroll = document.body.scrollWidth;
			yScroll = window.innerHeight + window.scrollMaxY;
		}
		else 
		{
			xScroll = document.body.offsetWidth;
			yScroll = document.body.offsetHeight;
		}
		var pageHeight,pageWidth;
		var windowWidth, windowHeight;
		if (self.innerHeight)
		{
			windowWidth = self.innerWidth;
			windowHeight = self.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientHeight)
		{
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		}
		else if (document.body)
		{
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		}
		if (yScroll < windowHeight)
		{
			pageHeight = windowHeight;
		}
		else
		{
			pageHeight = yScroll;
		}
		if (xScroll < windowWidth)
		{
			pageWidth = windowWidth;
		}
		else
		{
			pageWidth = xScroll;
		}
		arrayPageSize = new Array(pageWidth, pageHeight, windowWidth, windowHeight);
		return arrayPageSize;
	},
	windowWidth : function()
	{ 
		return this.dimension()[2];
	},
	windowHeight: function()
	{ 
		return this.dimension()[3];
	},
	pageWidth : function()
	{ 
		return this.dimension()[0];
	},
	pageHeight: function()
	{ 
		return this.dimension()[1];
	},
	scrollTop : function ()    //浏览器滚动条位置
	{
		var _scrollTop = 0;
		if (document.documentElement && document.documentElement.scrollTop){
			_scrollTop = document.documentElement.scrollTop;
		}else if (document.body){
			_scrollTop = document.body.scrollTop;
		}else if (window.pageYOffset){
			_scrollTop = window.pageYOffset;
		}
		return _scrollTop;
	},
	scrollLeft : function ()    //浏览器滚动条位置
	{
		var _scrollLeft = 0;
		if (document.documentElement && document.documentElement.scrollTop){
			_scrollLeft = document.documentElement.scrollLeft;
		}else if (document.body){
			_scrollLeft = document.body.scrollLeft;
		}else if (window.pageYOffset){
			_scrollLeft = window.pageXOffset;
		}
		return _scrollLeft;
	},
	//delayShowCommon:延迟执行某函数
	//参数列表：inum-循环次数,arguments[1]为执行条件,其余为传递的参数字串
	delayExecute : function (xhnum,icondition,ifunctionName,iarguments)
	{	
		var inum = parseInt(arguments[0]);
		if (inum < 1){return;}
		if ((typeof(icondition)=="boolean" && icondition == true)||this.element.$(arguments[1])!=null)
		{
			var request1 = returnArgumentsList(arguments,3,null);
			eval(arguments[2]+"("+request1+")");
		}
		else
		{	
			inum -= 1;	
			var request1 = returnArgumentsList(arguments,1,null);	
			var ifor = "delayExecute(\""+inum+"\","+request1+")";
			window.setTimeout(ifor,500);
			//document.getElementById("test").innerHTML = document.getElementById("test").innerHTML + inum+"<br />";
		}		
	},
	confirmExecute : function(iurl)
	{
		if(confirm("确定执行该操作吗?"))
		{location.href=iurl;}
		else{return;}
	},
	confirmSubmit : function(pForm)
	{
		if(confirm("确定执行该操作吗?"))
		{ 
			if (this.element.$(pForm)) { this.element.$(pForm).submit(); }
			else { document.forms[0].submit(); }
		}
		else{ return; }
	},
	resizeImg : function (ImgD,iwidth,iheight)
	{ 
		 var image=new Image(); 
		 image.src=ImgD.src; 
		 if(image.width>0 && image.height>0){ 
			if(image.width/image.height>= iwidth/iheight){ 
			   if(image.width>iwidth){ 
				   ImgD.width=iwidth; 
				   ImgD.height=(image.height*iwidth)/image.width; 
			   }else{ 
					  ImgD.width=iwidth; 
					  ImgD.height=(image.height*iwidth)/image.width; 
					} 
				   ImgD.alt=image.width+"×"+image.height; 
			} 
			else{ 
					if(image.height>iheight){ 
						   ImgD.height=iheight; 
						   ImgD.width=(image.width*iheight)/image.height; 
					}else{ 
							ImgD.height=iheight; 
						   ImgD.width=(image.width*iheight)/image.height; 
						 } 
					ImgD.alt=image.width + "*" + image.height; 
				}
			ImgD.style.cursor= "pointer";
		} 
	},
	
	checkboxAll : function (schkall,sobj)
	{
		if (!schkall) { schkall = 'chkall'; }
		if(element.$(sobj))
		{
			for (var i=0;i < element.$(sobj).getElementsByTagName("input").length;i++) 
			{
				var e = element.$(sobj).getElementsByTagName("input")[i];
				if (e.name != schkall) e.checked = element.$(schkall).checked; 
			}	
		}	
	},
	//动态加载js文件
	loadJS : function (file)
	{
		var head = document.getElementsByTagName("HEAD").item(0);
		var script = document.createElement("SCRIPT");
		script.src = file;
		script.type = "text/javascript";
		head.appendChild(script);
	}

};

g.o_popWindow = {
	element : g.o_element ,
	page : g.o_page ,
	openNew : function(pUrl, pWidth, pHeight, pTitle)
	{		

		var url = pUrl;
		if (pWidth)
		{
			var tTitle = "www.netjie.com.cn";
			if (pTitle) tTitle = pTitle;
			var width = pWidth;
			var height = pHeight;
			var iLeft = ( window.screen.Width  - width ) / 2 ;
			var iTop  = ( window.screen.Height - height ) / 2 ;
			var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes,scrollbars=yes" ;
			sOptions += ",width=" + width ;
			sOptions += ",height=" + height ;
			sOptions += ",left=" + iLeft ;
			sOptions += ",top=" + iTop ;
			window.open( url, tTitle, sOptions ) ;
		}
		else
		{
			window.open( url);
		}
	},
	create : function (iwidth, iheight, pUrl)
	{		
		this.createBackgroundDiv();	
		var tOutObj = this.createPopWindow(iwidth,iheight);
		new classDrag(tOutObj,"move",false,false,false,false,true,false);
		if ( pUrl != "" && pUrl != null )
		{ this.element.$("pw_content").innerHTML = "<iframe src='" + pUrl + "' frameborder='0' width='100%' height='100%'></iframe>"; }
	},
	closeWindow : function ()
	{
		if(this.element.$("pw_bg"))
		{ this.element.$("pw_bg").style.display="none"; }
		if(this.element.$("pw_outer"))
		{ this.element.$("pw_outer").style.display = "none"; }
		if ( parent.document.getElementById("pw_bg") )
		{ parent.document.getElementById("pw_bg").style.display="none"; }
		if ( parent.document.getElementById("pw_outer") )
		{ parent.document.getElementById("pw_outer").style.display="none"; }
	},
	showBigImage : function  (p, evt, pWidth, pHeight)
	{		
		var ss = this.showBigImageInterface(p, evt, pWidth, pHeight);
		ss.style.display = "";
		
	},
	closeBigImage : function ()
	{
		g.o_element.hidden(this.bigImageElementOuter);	
	},
	createBackgroundDiv : function ()
	{
		var bDiv = this.element.$("pw_bg");
		if (bDiv == null)
		{
			bDiv=document.createElement("div");
			bDiv.setAttribute("id","pw_bg");
			document.body.appendChild(bDiv);
		}
		bDiv.setAttribute("style","padding:0px;margin:0px;position:absolute;width:100%;top:0px;left:0px;background-color:#ECECEC;-moz-opacity:0.5;z-index:5;");	
		bDiv.style.height = this.page.pageHeight() + "px";
		bDiv.style.padding = "0px";
		bDiv.style.margin = "0px";
		bDiv.style.position = "absolute";
		bDiv.style.width = "100%";
		bDiv.style.top = "0px";
		bDiv.style.left = "0px";
		bDiv.style.backgroundColor = "#ECECEC";
		bDiv.style.zIndex = "5";
		if(bDiv.style.MozOpacity)
		{ bDiv.style.MozOpacity = "0.5"; }
		if(bDiv.style.opacity)
		{ bDiv.style.opacity = "0.5"; }	
		if ( bDiv.style.filter )
		{ bDiv.style.filter = "alpha(opacity=50)"; }
	},
	createPopWindow : function (iwidth,iheight)
	{
		var pwidth = parseInt(iwidth);
		var pheight = parseInt(iheight);
		if (pwidth > 0)
		{
			if (Math.floor( this.page.pageWidth() *95/100 ) < pwidth )
			{pwidth = Math.floor( this.page.pageWidth() *95/100 );}
			else if(pwidth<150)
			{pwidth = 300;}
		}	
		var innerHeightStyle;
		if (pheight>0)
		{		
			if (Math.floor( this.page.pageHeight() *90/100) < pheight)
			{
				pheight = Math.floor( this.page.pageHeight() *90/100);	
			}
		}
		else
		{
			pheight = 300; 
		}
		innerHeightStyle = "height:"+ pheight +"px;overflow:hidden;";
		
		if (this.element.$("pw_outer") == null)
		{
			var addpopDiv = document.createElement("div");
			addpopDiv.setAttribute("id","pw_outer");
			//if(document.getElementsByTagName("form")[0]!=null) 
			{ document.body.appendChild(addpopDiv); }
			//else { document.body.forms[0].appendChild(addpopDiv); }
		}
		var popDiv1 = this.element.$("pw_outer");
		popDiv1.style.position = "absolute";
		popDiv1.style.width = pwidth + "px";
		popDiv1.style.height = "auto";
		popDiv1.style.backgroundColor = "#ECECEC";
		popDiv1.style.zIndex = "10";
		popDiv1.style.padding = "1px";
		popDiv1.style.cursor = "move";	
		popDiv1.style.top = this.page.scrollTop() + 50 +"px";
		popDiv1.style.left = Math.floor(( this.page.pageWidth() - pwidth )/2 ) + "px";	
		popDiv1.style.border = "#FF9900 1px solid";	
		
		popDiv1.innerHTML = "<div style='width:100%;background-color:#FF9900;color:white;float:left;clear:both;'><span style='float:right;margin-right:20px;cursor:pointer;height:25px;' onClick='g.o_event.stopPropagation(event);g.o_popWindow.closeWindow();'>[关闭窗口]</span></div><div id='pw_content' style='background-color:#FFFFFF;width:100%;cursor:auto;"+innerHeightStyle+"float:left;clear:both;position:relative;' onMouseDown='g.o_event.stopPropagation(event);'></div>";	
		popDiv1.style.display = "";
		return popDiv1;	
	},
	bigImageElement : "p_b_image_in" ,
	bigImageElementOuter : "pop_big_image" ,
	showBigImageInterface : function  (p, evt, pWidth, pHeight, pOffsetX, pOffsetY)
	{
		if (!pOffsetX) { pOffsetX = 20; }
		if (!pOffsetY) { pOffsetY = 5; }
		var tOutElement = this.bigImageElementOuter;
		var PopMenu = this.element.$(tOutElement);
		if (pWidth == null){ pWidth = 400; }
		if (pHeight == null){ pHeight = 400; }
		
		if(PopMenu == null)
		{
			PopMenu=document.createElement("span");
			PopMenu.setAttribute("id",tOutElement);
			document.body.appendChild(PopMenu);			
		}
		//对p进行处理,如是多个则显示列表;
		var innerContent = "<img src='"+ p +"' onload='javascript:g.o_g.resizeImage(this, "+pWidth+", "+pHeight+")' />";
		if ( p.indexOf(",") > 0 )
		{
			innerContent = "";
			var tp = new Array();
			tp = p.split(","); 
			for (var i = 0; i < tp.length; i++)
			{
				if (tp[i] != "") 
				{
					innerContent = innerContent + "<img src='"+ tp[i] +"' onload='javascript:g.o_g.resizeImage(this, "+ Math.floor(pWidth/tp.length) +", "+Math.floor(pHeight/tp.length)+")' style='margin:2px;' />";
				}	
			}
		} 
		PopMenu.innerHTML = "<div id='"+this.bigImageElement+"' style='width:auto;' onmouseover=\"g.o_element.show('"+tOutElement+"')\" onmouseout=\"g.o_element.hidden('"+tOutElement+"')\">"+innerContent+"</div>";
		PopMenu.style.position = "absolute";
		PopMenu.style.padding = "10px";
		PopMenu.style.backgroundColor = "#ECECEC";
		PopMenu.style.border = "#CCCCCC 1px solid";
		
		if (window.event) evt = window.event;
		var tLeft = evt.clientX + pOffsetX ;
		var tTop = evt.clientY + pOffsetY ;
		if ( (evt.clientX + pWidth) > g.o_page.pageWidth() )
		{ tLeft = g.o_page.pageWidth() - pWidth - 20 ; } 
		if ( (evt.clientY + pHeight) > g.o_page.pageHeight() )
		{ tTop = g.o_page.pageHeight() - pHeight - 20;  }
		PopMenu.style.left = g.o_page.scrollLeft() + tLeft + "px";
		PopMenu.style.top = g.o_page.scrollTop() + tTop + "px";		
		return PopMenu;
	}

};

g.o_slideImage = {
	element : function (tID, tObjName)
	{
		this.ID = tID; 
		this.ObjName = tObjName;
		this.Width = 0; this.Height = 0; this.TimeOut = 5000; this.Effect = 23; 
		this.T_Len = 1; this.PicNum = -1; this.Img = null; this.Url=null; 
		this.Title = null; this.AllPic = new Array(); 
		//this.Add = this.AddImage ; 
		//this.Show = this.ShowSlide ;
		//this.LoopShow = this.LoopShowSlide ;
		
		this.Add = function (SP)
		{
			this.AllPic[this.AllPic.length] = SP; 
		};
		this.Show = function ()
		{			
			if(this.AllPic[0] == null) return false;
			document.write("<div style='text-align:center' onmouseover='" + this.ObjName + ".PauseLoop()' onmouseout='" + this.ObjName + ".ContinueLoop()'><a id='Url" + this.ID + "' href=''><img id='Img" + this.ID + "' width='" + this.Width + "'  height='" + this.Height + "' src='' style='border:1px solid #000000'></a>");
			if(this.T_Len != 0) 
			{ document.write("<br><span id='Title" + this.ID + "'></span>"); }
			document.write("</div>");
			this.Img = document.getElementById("Img" + this.ID);	
			this.Url = document.getElementById("Url" + this.ID);
			this.Title = document.getElementById("Title" + this.ID);
			this.LoopShow();
		};
		this.LoopShow = function () 
		{	
			if(this.PicNum < this.AllPic.length-1) this.PicNum++ ;
			else this.PicNum = 0;
			//this.Img.filters.revealTrans.Transition = this.Effect;
			//this.Img.filters.revealTrans.apply();
			this.Img.src = this.AllPic[this.PicNum].ImgUrl;
			//this.Img.filters.revealTrans.play();
			this.Url.href = this.AllPic[this.PicNum].LinkUrl;
			if(this.Title) this.Title.innerHTML = "<a href='" + this.AllPic[this.PicNum].LinkUrl + "'>" + this.AllPic[this.PicNum].Title + "</a>";
			this.Img.timer = setTimeout(this.ObjName + ".LoopShow()", this.TimeOut);
		};
		this.PauseLoop = function ()
		{
			//alert(this.Img.timer);
			if (this.Img) window.clearTimeout(this.Img.timer);	
		};
		this.ContinueLoop = function ()
		{
			//alert(this.Img.timer);
			if (this.Img) this.Img.timer = setTimeout(this.ObjName + ".LoopShow()", this.TimeOut);
		};
	},
	imageItem : function ()
	{
		this.ImgUrl = ""; this.LinkUrl = ""; this.Title = "";
	}
	
};

g.o_ajax = {
	//创建XMLHTTP对象
	_obj : function ()
	{	
		var ixmlhttp = false;
		if (window.XMLHttpRequest) 
		{
			ixmlhttp = new XMLHttpRequest();
			if (ixmlhttp.overrideMimeType)
			{
				//ixmlhttp.overrideMimeType('text/xml');
			}
		}
		else
		{
			try	
			{
				ixmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			} 
			catch (e) 
			{
				try 
				{
					ixmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				} 
				catch (e) 
				{
					ixmlhttp = false;
				}
			}
		}
		return ixmlhttp;
	},
	_setReturnListener : function (sxmlhttp, _this)
	{
		//返回一个监听XMLHttpRequest实例的匿名函数
		return function()
		{
			if(sxmlhttp.readyState==4 && sxmlhttp.status==200)
			{
				if(sxmlhttp.responseText!=""||sxmlhttp.responseText !=null)
				{
					_this.returnValue = sxmlhttp.responseText;
				}
			}
		}
	},
	_setListener : function (sxmlhttp,sobj)
	{
		//返回一个监听XMLHttpRequest实例的匿名函数
		return function()
		{
			if(sxmlhttp.readyState==4 && sxmlhttp.status==200)
			{
				if(sxmlhttp.responseText!=""||sxmlhttp.responseText !=null)
				{ 
					g.o_element.setValue(sobj,sxmlhttp.responseText);					
				}
			}
		}
	},
	_setXListener : function (sxmlhttp,sobj,ifunctionName,iarguments)
	{
		var request1 = g.o_g.stringFromArguments(arguments,3,null);
		request1 = request1.replace(/(\"){2,}/g,"\"")
		return function()
		{
			if(sxmlhttp.readyState==4 && sxmlhttp.status==200)
			{
				if(sxmlhttp.responseText!=""||sxmlhttp.responseText !=null)
				{
					g.o_element.setValue(sobj,sxmlhttp.responseText);				
					eval(ifunctionName+"("+request1+")");
				}
			}
		}	
	},
	_setPostListener : function (ixmlhttp,icallback)
	{
		//返回一个监听XMLHttpRequest实例的匿名函数
		return function()
		{
			if(ixmlhttp.readyState==4&&ixmlhttp.status==200)
			{
				if(ixmlhttp.responseText!=""||ixmlhttp.responseText !=null)
				{
					if ( icallback != null && icallback !="" )
					{
						icallback(ixmlhttp.responseText);	
					}
				}
			}
		}
	},
	_formToRequestString : function (form_obj)
	{
		var query_string='';
		var and='';
		for (var i=0;i<form_obj.length;i++ )
		{
			var e=form_obj[i];
			if (e.name) {
				if (e.type=='select-one')
				{
					element_value=e.options[e.selectedIndex].value;
				}
				else if (e.type=='select-multiple')
				{
					for (var n=0;n<e.length;n++) {
						var op=e.options[n];
						if (op.selected) {
							query_string+=and+e.name+'='+escape(op.value);
							and="&"
						}
					}
					continue;
				}
				else if (e.type=='checkbox' || e.type=='radio')
				{
					if (e.checked == false) {   
						continue;   
					}   
					element_value=e.value;
				}
				else if (typeof e.value != 'undefined') {
					element_value=e.value;
				}
				else {
					continue;
				}
				query_string+=and+e.name+'='+escape(element_value);
				and="&"
			}
	
		}
		return query_string;
	},
	ajax : function (pType, surl, sobj, initJS, sfunction)
	{
		this.xmlhttp = this._obj();
		this.processUrl = surl;
		this.processObj = sobj;	
		this.initJS = initJS;
		var handlerFuntion;
		if (pType.toLowerCase() == "post")
		{
			handlerFuntion = this._setListener(this.xmlhttp, sfunction) ;	
		}
		else if ( pType.toLowerCase() == "return" )
		{
			handlerFuntion = this._setReturnListener(this.xmlhttp, this)	
		}
		else
		{
			if(sfunction != null && sfunction!="")
			{
				handlerFuntion = this._setXListener(this.xmlhttp,this.processObj,sfunction.toString(),g.o_g.stringFromArguments(arguments,5,null));
			}
			else
			{
				handlerFuntion = this._setListener(this.xmlhttp, this.processObj) ;	
			}
		}
		this.processFunction = handlerFuntion;	
		this.xmlhttp.onreadystatechange = handlerFuntion;
		this.returnValue = "";
		this.start = function () {	
			if (this.processUrl == "")
			{
				return;
			}	
			if(this.initJS != null||this.initJS != "")
			{
				g.o_page.loadJS(this.initJS);
			}
			if (pType.toLowerCase() == "post")
			{
				
				this.xmlhttp.open("POST",this.processUrl,true);
				this.xmlhttp.setRequestHeader("If-Modified-Since","0");
				this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
				var param = this._formToRequestString(this.processObj);
				this.xmlhttp.send(param);
			}
			else
			{
				this.xmlhttp.open("GET",this.processUrl,true);
				this.xmlhttp.setRequestHeader("If-Modified-Since","0");
				this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");	
				this.xmlhttp.send(null);
			}			
		};		
		this.start();
	},	
	get : function (surl,sobj,initJS)
	{ 
		if (initJS == "undefined") { initJS = null; }
		this.ajax("get", surl, sobj, initJS, null);		
	},
	post : function (surl,sobj,initJS)
	{
		this.ajax("post", surl, sobj, initJS, null);		
	}
};

<!------------------------------------------------------------------------------
/*
* 拖动类
* param:
*      a       -   要被拖动对象的 id 或 对象本身
*      cursor -   拖动时的鼠标指针样式
*      onStart -   当拖动开始时执行的函数，函数原形: onDragStart(evt); evt - 事件
*      onDrag -   当对象正在被拖动时的执行函数，函数原形: onDrag(evt,clientX,clientY, movedX, movedY); evt - 事件,clientX - 当前 x 坐标,clientY - 当前 y 坐标, movedX - 水平方向移动的距离, movedY - 垂直方向移动的距离
*      onEnd   -   当拖动结束时的执行函数，函数原形: onDragEnd(evt); evt - 事件
*      onScroll - 每隔段时间执行的函数，函数原形: onScroll();
*      isDrag -   对象是否跟着动 true, false
*      isDisposed -拖动结束后不需要释放自己 true,false
* author: beikx
* date time: 2008.5.28
* email: beikx#126.com
*/
function classDrag(a,cursor,onStart,onDrag,onEnd, onScroll,isDrag, isDisposed)
{
    if (typeof(a) == 'string')
        this._obj = document.getElementById ? document.getElementById(a) : null
    else if (typeof(a) == 'object')
        this._obj = a;
    else
        this._obj = null;
    if(this._obj == null)
        return;
    if (!isNaN(this._obj.__isCD) && this._obj.__isCD == true)
        return;
    this._obj.__isCD = true;/* 对象是否已经创建了拖动 */
    this.__cursor = this._obj.style.cursor;
    if (cursor)
        this._obj.style.cursor = cursor;
    this.__onmousedown = this._obj.onmousedown;
    this._obj.onmousedown = this.start();
    if (onStart)
        this.onDragStart = onStart;
    else
        this.onDragStart = new Function();
    if (onDrag)
        this.onDrag = onDrag;
    else
        this.onDrag = new Function();
    if(onEnd)
        this.onDragEnd = onEnd;
    else
        this.onDragEnd = new Function();
    if(onScroll)
        this.onScroll = onScroll;
    else
        this.onScroll = new Function();
    if (isNaN(isDrag) || typeof(isDrag) != 'boolean')
        this.isDrag = true;
    else
        this.isDrag = isDrag;
    if (this.isDrag == true)
        this._obj.style.position = 'absolute';
    if (isNaN(isDisposed) || typeof(isDisposed) != 'boolean')
        this._isDisposed = true;
    else
        this._isDisposed = isDisposed;
    this.lastMouseX = null;
    this.lastMouseY = null;
    this.interval = null;
	if (this._obj.style.left!="")
	{
		var ileft = this._obj.style.left.replace(/px/,"");
		if(ileft.indexOf('%')>0)
		{ileft= ileft.replace(/\D?/,"");
		ileft = Math.floor(parseInt(window.screen.width) * parseFloat(ileft)/100);}
		this._obj.style.left = ileft + "px";
	}
}
classDrag.prototype._fixE = function(evt) {
    if (typeof evt == "undefined") {
        evt = window.event;
    }
    if (typeof evt.layerX == "undefined") {
        evt.layerX = evt.offsetX;
    }
    if (typeof evt.layerY == "undefined") {
        evt.layerY = evt.offsetY;
    }
    if (typeof evt.which == "undefined") {
        evt.which = evt.button;
    }
    return evt;
}
classDrag.prototype.start = function() {
    var a = this;
    return function(evt) {
        evt = a._fixE(evt);
        if (evt.which != 1) {
            return true;
        }
        if (isNaN(parseInt(a._obj.style.left))) {
            a._obj.style.left = (evt.clientX - a._obj.offsetWidth / 2) + 'px';
        }
        if (isNaN(parseInt(a._obj.style.top))) {
            a._obj.style.top = (evt.clientY - a._obj.offsetHeight / 2) + 'px';
        }
        a.onDragStart(evt);
        a.lastMouseX = evt.clientX;
        a.lastMouseY = evt.clientY;
        a.interval = window.setInterval(a.scroll(), 10);
        document.onmouseup = a.end();
        document.onmousemove = a.drag();
        return false;
    };
}
classDrag.prototype.drag = function() {
    var a = this;
    return function (evt) {
        evt = a._fixE(evt);
        if (evt.which == 0) {
            return (a.end())();
        }
        var element = a._obj;
        var _clientX = evt.clientX;
        var _clientY = evt.clientY;
        if (a.lastMouseX == _clientX && a.lastMouseY == _clientY) {
            return false;
        }
        var movedX, movedY;
        movedX = _clientX - a.lastMouseX;
        movedY = _clientY - a.lastMouseY;
        if (a.isDrag == true)
        {
            var l,t;
            l = parseInt(element.style.left) + movedX;
            t = parseInt(element.style.top) + movedY;
            element.style.left = l + "px";
            element.style.top = t + "px";
        }
        a.lastMouseX = _clientX;
        a.lastMouseY = _clientY;
        a.onDrag(evt,_clientX,_clientY, movedX, movedY);
        return false;
    };
}
classDrag.prototype.dispose = function() {
    this._obj.onmousedown = this.__onmousedown;
    this._obj.style.cursor = this.__cursor;
    this.__onmousedown = null;
    this.__cursor = null;
    this.__position = null;
    this.onDragStart = new Function();
    this.onDragEnd = new Function();
    this.onDrag = new Function();
    this._obj.__isCD = false;
    this._obj = null;
}
classDrag.prototype.end = function() {
    var a = this;
    return function (evt) {
        var _onDragEndFuc = a.onDragEnd;
        evt = a._fixE(evt);
        document.onmousemove = null;
        document.onmouseup = null;
        window.clearInterval(a.interval);
        a.interval = null;
        if (a._isDisposed == true)
            a.dispose();
        return _onDragEndFuc(evt);
    };
}
classDrag.prototype.scroll = function() {
    var a = this;
    return function() {
        var obj = a._obj;
        if (obj != null)
        {
            var b;
            if(document.body.scrollHeight > document.documentElement.clientHeight)
                b = document.body.scrollHeight;
            else
                b = document.documentElement.clientHeight;
            var c = a.clientHeight();
            var d = a.pageOffset();
            var e = d[1];
            var f = 4;
            var g = 0.05 * c;
            var h = e;
            var i = obj.offsetTop;
            if(a.lastMouseY <= g) {
                h = e - f;
            } else if(a.lastMouseY >= c - g) {
                h = Math.min(b - c,e + f);
            }
            var j = h - e;
            if(j != 0) {
                window.scrollBy(0, j);
                i += j;
                if (i > 0)
                    obj.style.top = i + "px";
            }
        }
        a.onScroll();
    };
}
classDrag.prototype.clientHeight = function() {
    var a;
    if(window.innerHeight) {
        a = window.innerHeight;
    } else if(document.documentElement && document.documentElement.clientHeight) {
        a = document.documentElement.clientHeight;
    } else {
        a = document.body.offsetHeight;
    }
    if( a < document.body.clientHeight) {
        return a;
    }
    return document.body.clientHeight;
}
classDrag.prototype.pageOffset = function() {
    var a = 0;
    var b = 0;
    if(typeof window.pageYOffset == "number") {
        a = window.pageXOffset;
        b = window.pageYOffset;
    } else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
        a = document.body.scrollLeft;
        b = document.body.scrollTop;
    } else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
        a = document.documentElement.scrollLeft;
        b = document.documentElement.scrollTop;
    }
    return [a,b];
}
//----------------------------------------->
var gnamespace = function(){}
gnamespace.prototype.register = function(fullNS)
{
	// 将命名空间切成N部分, 比如Grandsoft、GEA等
	var nsArray = fullNS.split('.');
	var sEval = "";
	var sNS = "";
	for (var i = 0; i < nsArray.length; i++)
	{
		if (i != 0) sNS += ".";
		sNS += nsArray[i];
		// 依次创建构造命名空间对象（假如不存在的话）的语句
		// 比如先创建Grandsoft，然后创建Grandsoft.GEA，依次下去
		sEval += "if (typeof(" + sNS + ") == 'undefined') " + sNS + " = new Object();"
	}
	if (sEval != "") eval(sEval);
}

var g = {};

g.o_event = {
	//注册事件方法,过时的方法
	addListener : function (oElement,sEvent,func)
	{ 
		if (oElement.attachEvent){ 
			oElement.attachEvent(sEvent,func); 
		} 
		else{ 
			sEvent=sEvent.substring(2,sEvent.length); 
			oElement.addEventListener(sEvent,func,false); 
		} 
	},
	//注册事件方法
	setListener : function (sobj,sEvent,sfunction)   
	{
		this.iname = sobj;
		this.iEvent = sEvent;	
		this.iprocess = sfunction;
		this.set = function()   
		{ 
			var eobj = g.o_element.$(this.iname); 			
			if(eobj.attachEvent)
			{
				eobj.attachEvent("on"+this.iEvent,this.iprocess);  	
				//eobj.attachEvent("onpropertychange",this.iprocess); 
			}
			else if(eobj.addEventListener){  
				//eobj.addEventListener("input",this.iprocess,false);				
				eobj.addEventListener(this.iEvent,this.iprocess,false);
			}	
		};
		this.set();
	},
	stopPropagation : function (e)
	{  
		if (!e) e = window.event;  
		if (e.stopPropagation){
			e.stopPropagation();  
		}
		else {  
			e.cancelBubble = true;  
		} 
	}
};

g.o_element = {
	$ : function (ee, pFrame)
	{
		if (!pFrame) { pFrame = self; }
		var xx=null;
		if(typeof(ee)=="string" )
		{ 
			if (ee !="") xx = pFrame.document.getElementById(ee); 
		}
		else if(typeof(ee) == "object"){ xx = ee; }
		else { return null; }
		
		if(xx) { return xx; }
		else { return null; }
	},
	value : function (eobj)
	{
		if(this.$(eobj)!=null)
		{
			if( this.$(eobj).tagName.toLowerCase().indexOf("input") >=0)
			{ return this.$(eobj).value; }
			else if( this.$(eobj).tagName.toLowerCase().indexOf("select") >=0)
			{ return this.$(eobj).value; }
			else
			{ return ""; }
		}
		else
		{ return ""; }
	},
	setValue : function (eobj, pValue, pFrame)
	{ 
		if (pValue == null) { pValue = ""; }
		if (!pFrame) { pFrame = self; }
		var tObj = this.$(eobj, pFrame)
		if(tObj!=null)
		{ 
			if( tObj.tagName.toLowerCase().indexOf("input") >=0 )
			{ tObj.value = pValue ; }
			else if( tObj.tagName.toLowerCase().indexOf("select") >=0 )
			{ tObj.selectedValue = pValue ; }
			else
			{
				tObj.innerHTML = pValue.toString();
				tObj.style.display = "";			
			}
		}		
	},
	addElement : function (ee, aname, etype)
	{
		if(etype == null || etype == ""){ etype= "span"; }
		if(this.$(ee)!=null)
		{ 
			if (this.$(aname)!=null)
			{
				var tempE = this.$(aname);
				this.delElement(this.$(aname));
				this.$(ee).appendChild(tempE)	;
			}
			else
			{
				var x=this.$(ee);
				var newel,newtext;
				newel=document.createElement(etype);
				newel.setAttribute("id",aname);
				newel.setAttribute("name",aname);
				x.appendChild(newel);
			}
		}		
	},
	delElement : function (aname)
	{
		if(this.$(aname)!=null)
		{
			this.$(aname).parentNode.removeChild(this.$(aname));
		}
	},
	show : function (eobj)
	{
		var eobj1 = this.$(eobj);
		if(eobj1)
		{
			eobj1.style.display = "";
		}
	},
	hidden : function (eobj)
	{
		var eobj1 = this.$(eobj);
		if(eobj1)
		{
			eobj1.style.display = "none"; 
		}
	},
	display : function (eobj)
	{
		var eobj1 = this.$(eobj);
		if(eobj1)
		{
			if (eobj1.style.display == "none") {eobj1.style.display = "";}
			else  {eobj1.style.display = "none";}
		}
	},
	setClassName : function (pobj, pClassName)
	{
		var eobj1 = this.$(pobj);
		if(eobj1) { eobj1.className = pClassName; }
	},
	switchClassName : function (pobj, pClassName1, pClassName2)
	{
		var eobj1 = this.$(pobj);
		if(eobj1)
		{ 
			if(eobj1.className == pClassName1 ) { eobj1.className = pClassName2; }
			else { eobj1.className = pClassName1; }
		}
	},
	collapse : function (pobj, pPrefix)
	{
		var eobj1 = this.$(pobj);
		if (eobj1)
		{
			this.collapseAll(pPrefix);
			eobj1.style.display = ''; 
		} 
	},
	collapseAll : function (pPrefix)
	{
		for (var i=0; i<20; i++)
		{
			var eobj1 = this.$(pPrefix + i.toString());
			if (eobj1) { eobj1.style.display = 'none'; }
		}
	},
	expandAll : function (pPrefix)
	{
		for (var i=0; i<20; i++)
		{
			var eobj1 = this.$(pPrefix + i.toString());
			if (eobj1) { eobj1.style.display = ''; }
		}
	},
	goTab : function (sindex,topPrefix,conPrefix,opencssname,closecssname)
	{
		for(var i=0; i<10; i++)
		{
			var tcon = this.$( conPrefix + i );
			var ttop = this.$( topPrefix + i );
			if(tcon)
			{
				if(sindex == i)
				{
					tcon.style.display = "block";
					if (typeof(opencssname) == "string" && opencssname !="")
					{ ttop.className = opencssname; }
				}
				else
				{
					tcon.style.display = "none";
					if (typeof(closecssname) == "string" && closecssname !="")
					{ ttop.className = closecssname; }
				}
			}
		}
	},
	cancleInnerCheckbox : function (pOutObj)
	{
		if (this.$(pOutObj))
		{
			var tcks = this.$(pOutObj).getElementsByTagName("INPUT");
			for (var i=0; i < tcks.length; i++)
			{
				tcks[i].checked = false;	
			}
		}
	},
	//复选框控制显示
	checkboxDisplay : function (pCheckboxObj, pTargetObj)
	{
		var eobj1 = this.$(pCheckboxObj);
		if(eobj1)
		{
			if (eobj1.checked == true) { this.$(pTargetObj).style.display = "";}
			else  { this.$(pTargetObj).style.display = "none"; }
		}	
	},
	//复选框反转控制显示
	checkboxReverseDisplay : function (pCheckboxObj, pTargetObj)
	{
		var eobj1 = this.$(pCheckboxObj);
		if(eobj1)
		{
			if (eobj1.checked == true) { this.$(pTargetObj).style.display = "none";}
			else  { this.$(pTargetObj).style.display = ""; }
		}	
	},
	//取得所有包容的input的值
	getDescendantValue : function( pOutObj )
	{
		var rValue = "";
		if ( this.$(pOutObj) )
		{
			var tcks = this.$(pOutObj).getElementsByTagName("INPUT");
			for ( var i=0; i < tcks.length; i++ )
			{
				if ( tcks[i].checked == true && tcks[i].value != "" )
				{ 
					rValue = rValue + tcks[i].value + "," ;
				}				
			}
			rValue = rValue.substr(0,rValue.length-1);
		}
		return rValue ;
	},
	checkAllByForm : function ( pForm )
	{
		if (this.$(pForm).elements)
		{
			for(i=0;i<this.$(pForm).elements.length;i++)
			{
				if(this.$(pForm).elements[i].checked)
				{
					this.$(pForm).elements[i].checked = false;
					this.$(pForm).CheckAll.checked = false;
				}
				else{
					this.$(pForm).elements[i].checked = true;
					this.$(pForm).CheckAll.checked = true;
				}
			}	
		}		
	},
	setMouseOverStyle : function (pNodes, pOverClassName)
	{
		if (pNodes.length)
		{
			for (var i=0; i < pNodes.length; i++)
			{
				this.setMouseOverStyle(pNodes[i], pOverClassName);					
			}
		}
		else if (pNodes.style) 
		{
			pNodes.onmouseover = function() {
				if (!pOverClassName) { this.style.backgroundColor = "#CCCCCC"; }
				else { this.className += pOverClassName; }
			};
			pNodes.onmouseout = function() {
				if (!pOverClassName) { this.style.backgroundColor = ""; }
				else { this.className = this.className.replace(pOverClassName, ""); }
			};	
		}
	},
	getPosition : function (pObj)
	{
		var tPosition;
		var textField = this.$(pObj);
		if(window.getSelection) tPosition = textField.selectionStart;		
		else tPosition = document.selection.createRange();
		return tPosition;
	},
	getSelectedText : function (pObj)
	{
		var selectedText;
		var textField = this.$(pObj);
		if(window.getSelection) selectedText = this.getTextFieldSelection(textField);		
		else selectedText = document.selection.createRange().text;
		return selectedText;
	},
	getTextFieldSelection : function (e)
	{
		//var oEvent=arguments.callee.caller.arguments[0];
		if(e.selectionStart != undefined && e.selectionEnd != undefined)
		return e.value.substring(e.selectionStart, e.selectionEnd);
		else return "";
	}
};

g.o_g = {
	element : g.o_element ,
	trim : function (str1)
	{
		return str1.replace(/(^\s*)|(\s*$)/g,"");
	},
	IsQName : function (w)
	{
		var str = "abcdefghijklmnopqrstuvwxyz_1234567890"
		 w = w.toLowerCase();
		var j = 0;
		for(i=0;i < w.length;i++){
			if(str.indexOf(w.substr(i,1)) != -1){
				j++;
			}
		}
		return j;
	},
	// 返回函数指定的逗号分隔的参数列表字串
	stringFromArguments : function (iarguments,istart,iend)
	{
		if (!iarguments){return null;}
		var request1 = "";
		if (parseInt(istart) < 0||istart == null) istart = 0;
		if(parseInt(iend) > iarguments.length ||iend == null) iend = iarguments.length;
		for (var i = istart;i<iend;i++)
		{
			request1 += "\""+iarguments[i].toString() + "\",";
		}
		if(request1 != "")
		{
			request1 = request1.substring(0,request1.length-1)	
		}
		return request1;
	},
	// 返回函数指定参数的用&连接的字串，
	urlStringFromArguments : function (iarguments,istart,iend)
	{
		var request1 = "";
		if (parseInt(istart) < 0||istart == null) istart = 0;
		if(parseInt(iend) > iarguments.length ||iend == null) iend = iarguments.length;
		for (var i = istart;i<iend;i++)
		{
			request1 += "&"+iarguments[i];
		}
		if(request1 != "")
		{
			request1 = request1.substring(1,request1.length)	
		}
		return request1;
	},
	//过滤重复字串,只留下一个,返两边不带分号的
	deleteSameString : function (ss)
	{
		var r="";
		var parray = ss.split(",");
		
		for(var qq=0;qq<parray.length;qq++)
		{
			var isame = false;
			for (var tt = qq+1;tt<parray.length;tt++)
			{
				if(parray[qq] == parray[tt])
				{	isame = true;	}
			}
			if (isame == false&&parray[qq]!="")
			{	r = r + parray[qq] + ",";	}
		}
		if(r!=""){	return r.substring(0,r.length - 1);	}
		else {	return r;	}
	},
	resizeImage : function (ImgD,iwidth,iheight)
	{ 
		 var image=new Image(); 
		 image.src=ImgD.src; 
		 if(image.width>0 && image.height>0)
		 { 
			if(image.width/image.height>= iwidth/iheight)
			{ 
			   if(image.width>iwidth)
			   { 
				   ImgD.width=iwidth; 
				   ImgD.height=(image.height*iwidth)/image.width; 
			   }
			   else
			   { 
					ImgD.width=iwidth; 
					ImgD.height=(image.height*iwidth)/image.width; 
				} 
				ImgD.alt=image.width+"×"+image.height; 
			} 
			else
			{ 
				if(image.height>iheight)
				{ 
					ImgD.height=iheight; 
					ImgD.width=(image.width*iheight)/image.height; 
				}
				else
				{ 
					ImgD.height=iheight; 
					ImgD.width=(image.width*iheight)/image.height; 
				} 
				ImgD.alt=image.width + "*" + image.height; 
			}
			ImgD.style.cursor= "pointer";
		} 
	}
	
};


g.o_page = {
	element : g.o_element,
	getPath : function ()
	{
		var sName;		
		sName = location.pathname;		
		return 	sName;		
	},
	getUrl : function ()
	{
		var sName;		
		sName = location.href;		
		return 	sName;		
	},
	getPageName : function ()
	{
		var sFullUrl,sName;		
		sFullUrl = location.pathname;		
		sName = sFullUrl.substr(sFullUrl.lastIndexOf("/")+1);
		return 	sName;		
	},
	parseUrl : function (pUrl, pParams, pType)
	{
		var sCurrentFileName,sCurrentParams;
		if ( pUrl.indexOf("?") >=0 )
		{
			sCurrentFileName = pUrl.substr(0,pUrl.indexOf("?"));
			sCurrentParams = pUrl.substr(pUrl.indexOf("?")+1);
		}
		else
		{
			sCurrentFileName = pUrl ;
			sCurrentParams = "";
		}
		
		if ( pParams!=null && pParams != "")
		{
			pParams = pParams.replace("|","&");
			pParams = pParams.replace("$","&");
			var sArray;
			sArray = pParams.split("&");
			
			if(sCurrentParams != "")
			{
				sCurrentParams = "&" + sCurrentParams ;
				for( var i = 0; i < sArray.length; i++)
				{
					var sName;
					sName = sArray[i].substr(0,sArray[i].indexOf("="));
					if( sName == "" && sArray[i] != ""){ sName = sArray[i] + "="; }
					if( sName != "" )
					{				
						var reg = new RegExp("[&]+" + sName + "[^&]*","i");
						sCurrentParams = sCurrentParams.replace(reg,"");
					}
				}
			}

			if ( pType != null && pType.toLowerCase() == "replace")
			{ 
				for( var i = 0; i<sArray.length; i++)
				{
					if( sArray[i]!="")
					{
						sCurrentParams = sCurrentParams + "&" + sArray[i];
					}
				}
				sCurrentParams = sCurrentParams.replace("&&","&");
			}						
		}
		sCurrentFileName = sCurrentFileName + "?" + sCurrentParams;
		sCurrentFileName = sCurrentFileName.replace("?&","?");
		
		return sCurrentFileName;
	},
	replaceParamsUrl : function (pUrl, pParams)
	{
		return this.parseUrl(pUrl, pParams,"replace");	
	},
	removeParamsUrl : function (pUrl, pParams)
	{
		return this.parseUrl(pUrl, pParams,"");	
	},
	parseCurrentUrl : function (pParams,pType)
	{
		var tUrl
		tUrl = location.href;
		return this.parseUrl(tUrl, pParams, pType)
	},
	replaceParamsCurrentUrl : function (pParams)
	{
		return this.parseCurrentUrl(pParams,"replace");	
	},
	removeParamsCurrentUrl : function (pParams)
	{
		return this.parseCurrentUrl(pParams,"");	
	},
	goRemoveParamsCurrentUrl : function (pParams, pTarget)
	{	
		var tUrl = this.removeParamsCurrentUrl(pParams);
		this.goUrl(tUrl, pTarget);
	},
	goReplaceParamsCurrentUrl : function (pParams, pTarget)
	{	
		var tUrl = this.replaceParamsCurrentUrl(pParams);
		this.goUrl(tUrl, pTarget);
	},
	goUrl : function (pUrl, pTarget)
	{	
		if (pTarget==null) { location.href = pUrl; }
		else if (pTarget.toLowerCase()=="top") { top.location.href = pUrl; }
		else if (pTarget.toLowerCase()=="blank" || pTarget.toLowerCase()=="new") { window.open(pUrl); }
		else { location.href = pUrl; }
	},
	turn : function (sselectobj,surl,sobj)
	{
		if (sobj == "")
		{ window.location.href = surl + sselectobj.value; }
		else if (this.element.$(sobj))
		{ XHRGetCommon(surl + sselectobj.value,sobj,null); }
	},
	turnByDorpList : function (pThis, pDropList)
	{
		if (this.element.$(pDropList))
		{
			var sParam = pDropList +"=" + this.element.$(pDropList).value;
			var otherParams = "";//"&Action=";
			location.href = this.replaceParamsCurrentUrl(sParam + otherParams);
		}
	},
	turnByDorpListValue : function (pDropList)
	{
		if (this.element.$(pDropList))
		{
			location.href = this.element.$(pDropList).value;
		}
	},
	addFavorite : function (stitle,surl,sptitle)
	{
		if (stitle == null) { stitle = document.title; }
		if (sptitle!=null) { stitle = sptitle;}
		if (surl == null) { surl = location.href; }
		if (window.sidebar) {
		window.sidebar.addPanel(stitle,surl,sptitle);
		} else if( document.all ) {
		window.external.AddFavorite(surl,stitle);
		} else if( window.opera && window.print ) {
		return true;}	
	},
	setHome : function (obj,vrl)
	{
		if (this.element.$(obj) == null){ return; }
		obj = this.element.$(obj);
		if (vrl == null || vrl == ""){		vrl = location.href;	}
		try{
			obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
		}
		catch(e){
			if(window.netscape) {
				try {
					netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
				}
				catch (e) {
					alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可。");
				}
				var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
				prefs.setCharPref('browser.startup.homepage',vrl);
			 }
		}
	},
	//返回四个尺寸值,分别是页面宽/高/窗口宽/高
	dimension : function ()
	{
		var xScroll, yScroll;
		if (document.body.scrollHeight > document.body.offsetHeight)
		{
			xScroll = document.body.scrollWidth;
			yScroll = document.body.scrollHeight;
		}
		else if (window.innerHeight && window.scrollMaxY)
		{
			xScroll = document.body.scrollWidth;
			yScroll = window.innerHeight + window.scrollMaxY;
		}
		else 
		{
			xScroll = document.body.offsetWidth;
			yScroll = document.body.offsetHeight;
		}
		var pageHeight,pageWidth;
		var windowWidth, windowHeight;
		if (self.innerHeight)
		{
			windowWidth = self.innerWidth;
			windowHeight = self.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientHeight)
		{
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		}
		else if (document.body)
		{
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		}
		if (yScroll < windowHeight)
		{
			pageHeight = windowHeight;
		}
		else
		{
			pageHeight = yScroll;
		}
		if (xScroll < windowWidth)
		{
			pageWidth = windowWidth;
		}
		else
		{
			pageWidth = xScroll;
		}
		arrayPageSize = new Array(pageWidth, pageHeight, windowWidth, windowHeight);
		return arrayPageSize;
	},
	windowWidth : function()
	{ 
		return this.dimension()[2];
	},
	windowHeight: function()
	{ 
		return this.dimension()[3];
	},
	pageWidth : function()
	{ 
		return this.dimension()[0];
	},
	pageHeight: function()
	{ 
		return this.dimension()[1];
	},
	scrollTop : function ()    //浏览器滚动条位置
	{
		var _scrollTop = 0;
		if (document.documentElement && document.documentElement.scrollTop){
			_scrollTop = document.documentElement.scrollTop;
		}else if (document.body){
			_scrollTop = document.body.scrollTop;
		}else if (window.pageYOffset){
			_scrollTop = window.pageYOffset;
		}
		return _scrollTop;
	},
	scrollLeft : function ()    //浏览器滚动条位置
	{
		var _scrollLeft = 0;
		if (document.documentElement && document.documentElement.scrollTop){
			_scrollLeft = document.documentElement.scrollLeft;
		}else if (document.body){
			_scrollLeft = document.body.scrollLeft;
		}else if (window.pageYOffset){
			_scrollLeft = window.pageXOffset;
		}
		return _scrollLeft;
	},
	//delayShowCommon:延迟执行某函数
	//参数列表：inum-循环次数,arguments[1]为执行条件,其余为传递的参数字串
	delayExecute : function (xhnum,icondition,ifunctionName,iarguments)
	{	
		var inum = parseInt(arguments[0]);
		if (inum < 1){return;}
		if ((typeof(icondition)=="boolean" && icondition == true)||this.element.$(arguments[1])!=null)
		{
			var request1 = returnArgumentsList(arguments,3,null);
			eval(arguments[2]+"("+request1+")");
		}
		else
		{	
			inum -= 1;	
			var request1 = returnArgumentsList(arguments,1,null);	
			var ifor = "delayExecute(\""+inum+"\","+request1+")";
			window.setTimeout(ifor,500);
			//document.getElementById("test").innerHTML = document.getElementById("test").innerHTML + inum+"<br />";
		}		
	},
	confirmExecute : function(iurl)
	{
		if(confirm("确定执行该操作吗?"))
		{location.href=iurl;}
		else{return;}
	},
	confirmSubmit : function(pForm)
	{
		if(confirm("确定执行该操作吗?"))
		{ 
			if (this.element.$(pForm)) { this.element.$(pForm).submit(); }
			else { document.forms[0].submit(); }
		}
		else{ return; }
	},
	resizeImg : function (ImgD,iwidth,iheight)
	{ 
		 var image=new Image(); 
		 image.src=ImgD.src; 
		 if(image.width>0 && image.height>0){ 
			if(image.width/image.height>= iwidth/iheight){ 
			   if(image.width>iwidth){ 
				   ImgD.width=iwidth; 
				   ImgD.height=(image.height*iwidth)/image.width; 
			   }else{ 
					  ImgD.width=iwidth; 
					  ImgD.height=(image.height*iwidth)/image.width; 
					} 
				   ImgD.alt=image.width+"×"+image.height; 
			} 
			else{ 
					if(image.height>iheight){ 
						   ImgD.height=iheight; 
						   ImgD.width=(image.width*iheight)/image.height; 
					}else{ 
							ImgD.height=iheight; 
						   ImgD.width=(image.width*iheight)/image.height; 
						 } 
					ImgD.alt=image.width + "*" + image.height; 
				}
			ImgD.style.cursor= "pointer";
		} 
	},
	
	checkboxAll : function (schkall,sobj)
	{
		if (!schkall) { schkall = 'chkall'; }
		if(element.$(sobj))
		{
			for (var i=0;i < element.$(sobj).getElementsByTagName("input").length;i++) 
			{
				var e = element.$(sobj).getElementsByTagName("input")[i];
				if (e.name != schkall) e.checked = element.$(schkall).checked; 
			}	
		}	
	},
	//动态加载js文件
	loadJS : function (file)
	{
		var head = document.getElementsByTagName("HEAD").item(0);
		var script = document.createElement("SCRIPT");
		script.src = file;
		script.type = "text/javascript";
		head.appendChild(script);
	}

};

g.o_popWindow = {
	element : g.o_element ,
	page : g.o_page ,
	openNew : function(pUrl, pWidth, pHeight, pTitle)
	{		

		var url = pUrl;
		if (pWidth)
		{
			var tTitle = "www.netjie.com.cn";
			if (pTitle) tTitle = pTitle;
			var width = pWidth;
			var height = pHeight;
			var iLeft = ( window.screen.Width  - width ) / 2 ;
			var iTop  = ( window.screen.Height - height ) / 2 ;
			var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes,scrollbars=yes" ;
			sOptions += ",width=" + width ;
			sOptions += ",height=" + height ;
			sOptions += ",left=" + iLeft ;
			sOptions += ",top=" + iTop ;
			window.open( url, tTitle, sOptions ) ;
		}
		else
		{
			window.open( url);
		}
	},
	create : function (iwidth, iheight, pUrl)
	{		
		this.createBackgroundDiv();	
		var tOutObj = this.createPopWindow(iwidth,iheight);
		new classDrag(tOutObj,"move",false,false,false,false,true,false);
		if ( pUrl != "" && pUrl != null )
		{ this.element.$("pw_content").innerHTML = "<iframe src='" + pUrl + "' frameborder='0' width='100%' height='100%'></iframe>"; }
	},
	closeWindow : function ()
	{
		if(this.element.$("pw_bg"))
		{ this.element.$("pw_bg").style.display="none"; }
		if(this.element.$("pw_outer"))
		{ this.element.$("pw_outer").style.display = "none"; }
		if ( parent.document.getElementById("pw_bg") )
		{ parent.document.getElementById("pw_bg").style.display="none"; }
		if ( parent.document.getElementById("pw_outer") )
		{ parent.document.getElementById("pw_outer").style.display="none"; }
	},
	showBigImage : function  (p, evt, pWidth, pHeight)
	{		
		var ss = this.showBigImageInterface(p, evt, pWidth, pHeight);
		ss.style.display = "";
		
	},
	closeBigImage : function ()
	{
		g.o_element.hidden(this.bigImageElementOuter);	
	},
	createBackgroundDiv : function ()
	{
		var bDiv = this.element.$("pw_bg");
		if (bDiv == null)
		{
			bDiv=document.createElement("div");
			bDiv.setAttribute("id","pw_bg");
			document.body.appendChild(bDiv);
		}
		bDiv.setAttribute("style","padding:0px;margin:0px;position:absolute;width:100%;top:0px;left:0px;background-color:#ECECEC;-moz-opacity:0.5;z-index:5;");	
		bDiv.style.height = this.page.pageHeight() + "px";
		bDiv.style.padding = "0px";
		bDiv.style.margin = "0px";
		bDiv.style.position = "absolute";
		bDiv.style.width = "100%";
		bDiv.style.top = "0px";
		bDiv.style.left = "0px";
		bDiv.style.backgroundColor = "#ECECEC";
		bDiv.style.zIndex = "5";
		if(bDiv.style.MozOpacity)
		{ bDiv.style.MozOpacity = "0.5"; }
		if(bDiv.style.opacity)
		{ bDiv.style.opacity = "0.5"; }	
		if ( bDiv.style.filter )
		{ bDiv.style.filter = "alpha(opacity=50)"; }
	},
	createPopWindow : function (iwidth,iheight)
	{
		var pwidth = parseInt(iwidth);
		var pheight = parseInt(iheight);
		if (pwidth > 0)
		{
			if (Math.floor( this.page.pageWidth() *95/100 ) < pwidth )
			{pwidth = Math.floor( this.page.pageWidth() *95/100 );}
			else if(pwidth<150)
			{pwidth = 300;}
		}	
		var innerHeightStyle;
		if (pheight>0)
		{		
			if (Math.floor( this.page.pageHeight() *90/100) < pheight)
			{
				pheight = Math.floor( this.page.pageHeight() *90/100);	
			}
		}
		else
		{
			pheight = 300; 
		}
		innerHeightStyle = "height:"+ pheight +"px;overflow:hidden;";
		
		if (this.element.$("pw_outer") == null)
		{
			var addpopDiv = document.createElement("div");
			addpopDiv.setAttribute("id","pw_outer");
			//if(document.getElementsByTagName("form")[0]!=null) 
			{ document.body.appendChild(addpopDiv); }
			//else { document.body.forms[0].appendChild(addpopDiv); }
		}
		var popDiv1 = this.element.$("pw_outer");
		popDiv1.style.position = "absolute";
		popDiv1.style.width = pwidth + "px";
		popDiv1.style.height = "auto";
		popDiv1.style.backgroundColor = "#ECECEC";
		popDiv1.style.zIndex = "10";
		popDiv1.style.padding = "1px";
		popDiv1.style.cursor = "move";	
		popDiv1.style.top = this.page.scrollTop() + 50 +"px";
		popDiv1.style.left = Math.floor(( this.page.pageWidth() - pwidth )/2 ) + "px";	
		popDiv1.style.border = "#FF9900 1px solid";	
		
		popDiv1.innerHTML = "<div style='width:100%;background-color:#FF9900;color:white;float:left;clear:both;'><span style='float:right;margin-right:20px;cursor:pointer;height:25px;' onClick='g.o_event.stopPropagation(event);g.o_popWindow.closeWindow();'>[关闭窗口]</span></div><div id='pw_content' style='background-color:#FFFFFF;width:100%;cursor:auto;"+innerHeightStyle+"float:left;clear:both;position:relative;' onMouseDown='g.o_event.stopPropagation(event);'></div>";	
		popDiv1.style.display = "";
		return popDiv1;	
	},
	bigImageElement : "p_b_image_in" ,
	bigImageElementOuter : "pop_big_image" ,
	showBigImageInterface : function  (p, evt, pWidth, pHeight, pOffsetX, pOffsetY)
	{
		if (!pOffsetX) { pOffsetX = 20; }
		if (!pOffsetY) { pOffsetY = 5; }
		var tOutElement = this.bigImageElementOuter;
		var PopMenu = this.element.$(tOutElement);
		if (pWidth == null){ pWidth = 400; }
		if (pHeight == null){ pHeight = 400; }
		
		if(PopMenu == null)
		{
			PopMenu=document.createElement("span");
			PopMenu.setAttribute("id",tOutElement);
			document.body.appendChild(PopMenu);			
		}
		//对p进行处理,如是多个则显示列表;
		var innerContent = "<img src='"+ p +"' onload='javascript:g.o_g.resizeImage(this, "+pWidth+", "+pHeight+")' />";
		if ( p.indexOf(",") > 0 )
		{
			innerContent = "";
			var tp = new Array();
			tp = p.split(","); 
			for (var i = 0; i < tp.length; i++)
			{
				if (tp[i] != "") 
				{
					innerContent = innerContent + "<img src='"+ tp[i] +"' onload='javascript:g.o_g.resizeImage(this, "+ Math.floor(pWidth/tp.length) +", "+Math.floor(pHeight/tp.length)+")' style='margin:2px;' />";
				}	
			}
		} 
		PopMenu.innerHTML = "<div id='"+this.bigImageElement+"' style='width:auto;' onmouseover=\"g.o_element.show('"+tOutElement+"')\" onmouseout=\"g.o_element.hidden('"+tOutElement+"')\">"+innerContent+"</div>";
		PopMenu.style.position = "absolute";
		PopMenu.style.padding = "10px";
		PopMenu.style.backgroundColor = "#ECECEC";
		PopMenu.style.border = "#CCCCCC 1px solid";
		
		if (window.event) evt = window.event;
		var tLeft = evt.clientX + pOffsetX ;
		var tTop = evt.clientY + pOffsetY ;
		if ( (evt.clientX + pWidth) > g.o_page.pageWidth() )
		{ tLeft = g.o_page.pageWidth() - pWidth - 20 ; } 
		if ( (evt.clientY + pHeight) > g.o_page.pageHeight() )
		{ tTop = g.o_page.pageHeight() - pHeight - 20;  }
		PopMenu.style.left = g.o_page.scrollLeft() + tLeft + "px";
		PopMenu.style.top = g.o_page.scrollTop() + tTop + "px";		
		return PopMenu;
	}

};

g.o_slideImage = {
	element : function (tID, tObjName)
	{
		this.ID = tID; 
		this.ObjName = tObjName;
		this.Width = 0; this.Height = 0; this.TimeOut = 5000; this.Effect = 23; 
		this.T_Len = 1; this.PicNum = -1; this.Img = null; this.Url=null; 
		this.Title = null; this.AllPic = new Array(); 
		//this.Add = this.AddImage ; 
		//this.Show = this.ShowSlide ;
		//this.LoopShow = this.LoopShowSlide ;
		
		this.Add = function (SP)
		{
			this.AllPic[this.AllPic.length] = SP; 
		};
		this.Show = function ()
		{			
			if(this.AllPic[0] == null) return false;
			document.write("<div style='text-align:center' onmouseover='" + this.ObjName + ".PauseLoop()' onmouseout='" + this.ObjName + ".ContinueLoop()'><a id='Url" + this.ID + "' href=''><img id='Img" + this.ID + "' width='" + this.Width + "'  height='" + this.Height + "' src='' style='border:1px solid #000000'></a>");
			if(this.T_Len != 0) 
			{ document.write("<br><span id='Title" + this.ID + "'></span>"); }
			document.write("</div>");
			this.Img = document.getElementById("Img" + this.ID);	
			this.Url = document.getElementById("Url" + this.ID);
			this.Title = document.getElementById("Title" + this.ID);
			this.LoopShow();
		};
		this.LoopShow = function () 
		{	
			if(this.PicNum < this.AllPic.length-1) this.PicNum++ ;
			else this.PicNum = 0;
			//this.Img.filters.revealTrans.Transition = this.Effect;
			//this.Img.filters.revealTrans.apply();
			this.Img.src = this.AllPic[this.PicNum].ImgUrl;
			//this.Img.filters.revealTrans.play();
			this.Url.href = this.AllPic[this.PicNum].LinkUrl;
			if(this.Title) this.Title.innerHTML = "<a href='" + this.AllPic[this.PicNum].LinkUrl + "'>" + this.AllPic[this.PicNum].Title + "</a>";
			this.Img.timer = setTimeout(this.ObjName + ".LoopShow()", this.TimeOut);
		};
		this.PauseLoop = function ()
		{
			//alert(this.Img.timer);
			if (this.Img) window.clearTimeout(this.Img.timer);	
		};
		this.ContinueLoop = function ()
		{
			//alert(this.Img.timer);
			if (this.Img) this.Img.timer = setTimeout(this.ObjName + ".LoopShow()", this.TimeOut);
		};
	},
	imageItem : function ()
	{
		this.ImgUrl = ""; this.LinkUrl = ""; this.Title = "";
	}
	
};

g.o_ajax = {
	//创建XMLHTTP对象
	_obj : function ()
	{	
		var ixmlhttp = false;
		if (window.XMLHttpRequest) 
		{
			ixmlhttp = new XMLHttpRequest();
			if (ixmlhttp.overrideMimeType)
			{
				//ixmlhttp.overrideMimeType('text/xml');
			}
		}
		else
		{
			try	
			{
				ixmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			} 
			catch (e) 
			{
				try 
				{
					ixmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				} 
				catch (e) 
				{
					ixmlhttp = false;
				}
			}
		}
		return ixmlhttp;
	},
	_setReturnListener : function (sxmlhttp, _this)
	{
		//返回一个监听XMLHttpRequest实例的匿名函数
		return function()
		{
			if(sxmlhttp.readyState==4 && sxmlhttp.status==200)
			{
				if(sxmlhttp.responseText!=""||sxmlhttp.responseText !=null)
				{
					_this.returnValue = sxmlhttp.responseText;
				}
			}
		}
	},
	_setListener : function (sxmlhttp,sobj)
	{
		//返回一个监听XMLHttpRequest实例的匿名函数
		return function()
		{
			if(sxmlhttp.readyState==4 && sxmlhttp.status==200)
			{
				if(sxmlhttp.responseText!=""||sxmlhttp.responseText !=null)
				{ 
					g.o_element.setValue(sobj,sxmlhttp.responseText);					
				}
			}
		}
	},
	_setXListener : function (sxmlhttp,sobj,ifunctionName,iarguments)
	{
		var request1 = g.o_g.stringFromArguments(arguments,3,null);
		request1 = request1.replace(/(\"){2,}/g,"\"")
		return function()
		{
			if(sxmlhttp.readyState==4 && sxmlhttp.status==200)
			{
				if(sxmlhttp.responseText!=""||sxmlhttp.responseText !=null)
				{
					g.o_element.setValue(sobj,sxmlhttp.responseText);				
					eval(ifunctionName+"("+request1+")");
				}
			}
		}	
	},
	_setPostListener : function (ixmlhttp,icallback)
	{
		//返回一个监听XMLHttpRequest实例的匿名函数
		return function()
		{
			if(ixmlhttp.readyState==4&&ixmlhttp.status==200)
			{
				if(ixmlhttp.responseText!=""||ixmlhttp.responseText !=null)
				{
					if ( icallback != null && icallback !="" )
					{
						icallback(ixmlhttp.responseText);	
					}
				}
			}
		}
	},
	_formToRequestString : function (form_obj)
	{
		var query_string='';
		var and='';
		for (var i=0;i<form_obj.length;i++ )
		{
			var e=form_obj[i];
			if (e.name) {
				if (e.type=='select-one')
				{
					element_value=e.options[e.selectedIndex].value;
				}
				else if (e.type=='select-multiple')
				{
					for (var n=0;n<e.length;n++) {
						var op=e.options[n];
						if (op.selected) {
							query_string+=and+e.name+'='+escape(op.value);
							and="&"
						}
					}
					continue;
				}
				else if (e.type=='checkbox' || e.type=='radio')
				{
					if (e.checked == false) {   
						continue;   
					}   
					element_value=e.value;
				}
				else if (typeof e.value != 'undefined') {
					element_value=e.value;
				}
				else {
					continue;
				}
				query_string+=and+e.name+'='+escape(element_value);
				and="&"
			}
	
		}
		return query_string;
	},
	ajax : function (pType, surl, sobj, initJS, sfunction)
	{
		this.xmlhttp = this._obj();
		this.processUrl = surl;
		this.processObj = sobj;	
		this.initJS = initJS;
		var handlerFuntion;
		if (pType.toLowerCase() == "post")
		{
			handlerFuntion = this._setListener(this.xmlhttp, sfunction) ;	
		}
		else if ( pType.toLowerCase() == "return" )
		{
			handlerFuntion = this._setReturnListener(this.xmlhttp, this)	
		}
		else
		{
			if(sfunction != null && sfunction!="")
			{
				handlerFuntion = this._setXListener(this.xmlhttp,this.processObj,sfunction.toString(),g.o_g.stringFromArguments(arguments,5,null));
			}
			else
			{
				handlerFuntion = this._setListener(this.xmlhttp, this.processObj) ;	
			}
		}
		this.processFunction = handlerFuntion;	
		this.xmlhttp.onreadystatechange = handlerFuntion;
		this.returnValue = "";
		this.start = function () {	
			if (this.processUrl == "")
			{
				return;
			}	
			if(this.initJS != null||this.initJS != "")
			{
				g.o_page.loadJS(this.initJS);
			}
			if (pType.toLowerCase() == "post")
			{
				
				this.xmlhttp.open("POST",this.processUrl,true);
				this.xmlhttp.setRequestHeader("If-Modified-Since","0");
				this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
				var param = this._formToRequestString(this.processObj);
				this.xmlhttp.send(param);
			}
			else
			{
				this.xmlhttp.open("GET",this.processUrl,true);
				this.xmlhttp.setRequestHeader("If-Modified-Since","0");
				this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");	
				this.xmlhttp.send(null);
			}			
		};		
		this.start();
	},	
	get : function (surl,sobj,initJS)
	{ 
		if (initJS == "undefined") { initJS = null; }
		this.ajax("get", surl, sobj, initJS, null);		
	},
	post : function (surl,sobj,initJS)
	{
		this.ajax("post", surl, sobj, initJS, null);		
	}
};

<!------------------------------------------------------------------------------
/*
* 拖动类
* param:
*      a       -   要被拖动对象的 id 或 对象本身
*      cursor -   拖动时的鼠标指针样式
*      onStart -   当拖动开始时执行的函数，函数原形: onDragStart(evt); evt - 事件
*      onDrag -   当对象正在被拖动时的执行函数，函数原形: onDrag(evt,clientX,clientY, movedX, movedY); evt - 事件,clientX - 当前 x 坐标,clientY - 当前 y 坐标, movedX - 水平方向移动的距离, movedY - 垂直方向移动的距离
*      onEnd   -   当拖动结束时的执行函数，函数原形: onDragEnd(evt); evt - 事件
*      onScroll - 每隔段时间执行的函数，函数原形: onScroll();
*      isDrag -   对象是否跟着动 true, false
*      isDisposed -拖动结束后不需要释放自己 true,false
* author: beikx
* date time: 2008.5.28
* email: beikx#126.com
*/
function classDrag(a,cursor,onStart,onDrag,onEnd, onScroll,isDrag, isDisposed)
{
    if (typeof(a) == 'string')
        this._obj = document.getElementById ? document.getElementById(a) : null
    else if (typeof(a) == 'object')
        this._obj = a;
    else
        this._obj = null;
    if(this._obj == null)
        return;
    if (!isNaN(this._obj.__isCD) && this._obj.__isCD == true)
        return;
    this._obj.__isCD = true;/* 对象是否已经创建了拖动 */
    this.__cursor = this._obj.style.cursor;
    if (cursor)
        this._obj.style.cursor = cursor;
    this.__onmousedown = this._obj.onmousedown;
    this._obj.onmousedown = this.start();
    if (onStart)
        this.onDragStart = onStart;
    else
        this.onDragStart = new Function();
    if (onDrag)
        this.onDrag = onDrag;
    else
        this.onDrag = new Function();
    if(onEnd)
        this.onDragEnd = onEnd;
    else
        this.onDragEnd = new Function();
    if(onScroll)
        this.onScroll = onScroll;
    else
        this.onScroll = new Function();
    if (isNaN(isDrag) || typeof(isDrag) != 'boolean')
        this.isDrag = true;
    else
        this.isDrag = isDrag;
    if (this.isDrag == true)
        this._obj.style.position = 'absolute';
    if (isNaN(isDisposed) || typeof(isDisposed) != 'boolean')
        this._isDisposed = true;
    else
        this._isDisposed = isDisposed;
    this.lastMouseX = null;
    this.lastMouseY = null;
    this.interval = null;
	if (this._obj.style.left!="")
	{
		var ileft = this._obj.style.left.replace(/px/,"");
		if(ileft.indexOf('%')>0)
		{ileft= ileft.replace(/\D?/,"");
		ileft = Math.floor(parseInt(window.screen.width) * parseFloat(ileft)/100);}
		this._obj.style.left = ileft + "px";
	}
}
classDrag.prototype._fixE = function(evt) {
    if (typeof evt == "undefined") {
        evt = window.event;
    }
    if (typeof evt.layerX == "undefined") {
        evt.layerX = evt.offsetX;
    }
    if (typeof evt.layerY == "undefined") {
        evt.layerY = evt.offsetY;
    }
    if (typeof evt.which == "undefined") {
        evt.which = evt.button;
    }
    return evt;
}
classDrag.prototype.start = function() {
    var a = this;
    return function(evt) {
        evt = a._fixE(evt);
        if (evt.which != 1) {
            return true;
        }
        if (isNaN(parseInt(a._obj.style.left))) {
            a._obj.style.left = (evt.clientX - a._obj.offsetWidth / 2) + 'px';
        }
        if (isNaN(parseInt(a._obj.style.top))) {
            a._obj.style.top = (evt.clientY - a._obj.offsetHeight / 2) + 'px';
        }
        a.onDragStart(evt);
        a.lastMouseX = evt.clientX;
        a.lastMouseY = evt.clientY;
        a.interval = window.setInterval(a.scroll(), 10);
        document.onmouseup = a.end();
        document.onmousemove = a.drag();
        return false;
    };
}
classDrag.prototype.drag = function() {
    var a = this;
    return function (evt) {
        evt = a._fixE(evt);
        if (evt.which == 0) {
            return (a.end())();
        }
        var element = a._obj;
        var _clientX = evt.clientX;
        var _clientY = evt.clientY;
        if (a.lastMouseX == _clientX && a.lastMouseY == _clientY) {
            return false;
        }
        var movedX, movedY;
        movedX = _clientX - a.lastMouseX;
        movedY = _clientY - a.lastMouseY;
        if (a.isDrag == true)
        {
            var l,t;
            l = parseInt(element.style.left) + movedX;
            t = parseInt(element.style.top) + movedY;
            element.style.left = l + "px";
            element.style.top = t + "px";
        }
        a.lastMouseX = _clientX;
        a.lastMouseY = _clientY;
        a.onDrag(evt,_clientX,_clientY, movedX, movedY);
        return false;
    };
}
classDrag.prototype.dispose = function() {
    this._obj.onmousedown = this.__onmousedown;
    this._obj.style.cursor = this.__cursor;
    this.__onmousedown = null;
    this.__cursor = null;
    this.__position = null;
    this.onDragStart = new Function();
    this.onDragEnd = new Function();
    this.onDrag = new Function();
    this._obj.__isCD = false;
    this._obj = null;
}
classDrag.prototype.end = function() {
    var a = this;
    return function (evt) {
        var _onDragEndFuc = a.onDragEnd;
        evt = a._fixE(evt);
        document.onmousemove = null;
        document.onmouseup = null;
        window.clearInterval(a.interval);
        a.interval = null;
        if (a._isDisposed == true)
            a.dispose();
        return _onDragEndFuc(evt);
    };
}
classDrag.prototype.scroll = function() {
    var a = this;
    return function() {
        var obj = a._obj;
        if (obj != null)
        {
            var b;
            if(document.body.scrollHeight > document.documentElement.clientHeight)
                b = document.body.scrollHeight;
            else
                b = document.documentElement.clientHeight;
            var c = a.clientHeight();
            var d = a.pageOffset();
            var e = d[1];
            var f = 4;
            var g = 0.05 * c;
            var h = e;
            var i = obj.offsetTop;
            if(a.lastMouseY <= g) {
                h = e - f;
            } else if(a.lastMouseY >= c - g) {
                h = Math.min(b - c,e + f);
            }
            var j = h - e;
            if(j != 0) {
                window.scrollBy(0, j);
                i += j;
                if (i > 0)
                    obj.style.top = i + "px";
            }
        }
        a.onScroll();
    };
}
classDrag.prototype.clientHeight = function() {
    var a;
    if(window.innerHeight) {
        a = window.innerHeight;
    } else if(document.documentElement && document.documentElement.clientHeight) {
        a = document.documentElement.clientHeight;
    } else {
        a = document.body.offsetHeight;
    }
    if( a < document.body.clientHeight) {
        return a;
    }
    return document.body.clientHeight;
}
classDrag.prototype.pageOffset = function() {
    var a = 0;
    var b = 0;
    if(typeof window.pageYOffset == "number") {
        a = window.pageXOffset;
        b = window.pageYOffset;
    } else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
        a = document.body.scrollLeft;
        b = document.body.scrollTop;
    } else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
        a = document.documentElement.scrollLeft;
        b = document.documentElement.scrollTop;
    }
    return [a,b];
}
//----------------------------------------->

