﻿//fclr, fhclr, bg, bgh
//"#ffffff\",\"#ffffff\",\"#2F3540\",\"#999999\"
/*
菜单分组 建议加入到all.inc mmLoadMenus 后面
<script type="text/javascript">
	$('menuFg1').style.backgroundColor="#EDFAFD";
	$('menuItem2').style.borderBottom='solid 1px #E2A427';
	$('menuItem5').style.borderBottom='solid 1px #E2A427';
</script>
*/
function LoadBody(){
	
	
	}

function ShowVerify(){
	var s_source ="add";
	var s_chattitle ="积分够换";
	popup_open("/template/aspx/change/change.aspx",s_chattitle,600,400);	
	}


function CustomMenu(obj)
{
		
}				
				
function MenuChild(menuobj)
{
	menuobj.hideOnMouseOut=true;
	menuobj.bgColor="#CFE5F0";//'#555555';
	menuobj.menuBorder=0;
	menuobj.menuLiteBgColor='#FFFFFF';
	menuobj.menuBorderBgColor='#CFE5F0';
	menuobj.ChildBorderBgColor='#CFE5F0';
	
}

function Menu(label,pad, space, to, sx, sy, srel, opq, vert, idt, aw, ah,acw) 
{
	this.version = "020320 [Menu; mm_menu.js]";
	this.type = "Menu";
	
	switch(label)
	{
		case "root1"://parts
		{
			this.menuWidth =120;// mw;		
			break;
		}
		case "root4"://
		{
			this.menuWidth =210;// mw;		
			break;
		}
		case "root5"://
		{
			this.menuWidth =160;// mw;		
			break;
		}
	}
	
	
	
	this.menuChildWidth =acw/1.5;// mw;
	
	this.menuItemHeight =22 ;//mh;
	this.fontSize =12;// fs;
	this.fontWeight = "bolder";
	this.fontFamily ="Verdana";// fnt; 
			this.fontColor ="#383838";// fclr;
			this.fontColorHilite ="#ffffff";// fhclr;
			this.menuItemBgColor ="#B3D5E6";// bg;
			this.menuHiliteBgColor ="#7FB2CA";// bgh;
	this.bgColor = "#CFE5F0";//#555555; //主菜单 分隔
	this.menuBorder = 1;
	this.menuBgOpaque=opq;
	this.menuItemBorder = 1;
	this.menuItemIndent = idt;
			
	this.menuItemVAlign = "middle";// valgn;
	this.menuItemHAlign = "left";//halgn;
	this.menuItemPadding = pad;
	this.menuItemSpacing = space;
	this.menuLiteBgColor = "#B3D5E6";
	this.menuBorderBgColor = "";
		
	this.menuContainerBgColor = "#cccccc";
	this.childMenuIcon = "arrows.gif";
	this.submenuXOffset = sx;
	this.submenuYOffset = sy;
	this.submenuRelativeToItem = srel;
	this.vertical = vert;
	this.items = new Array();
	this.actions = new Array();
	this.childMenus = new Array();
	this.hideOnMouseOut = true;
	this.hideTimeout = to;
	this.addMenuItem = addMenuItem;
	this.writeMenus = writeMenus;
	this.MM_showMenu = MM_showMenu;
	this.onMenuItemOver = onMenuItemOver;
	this.onMenuItemAction = onMenuItemAction;
	this.hideMenu = hideMenu;
	this.hideChildMenu = hideChildMenu;
	if (!window.menus) window.menus = new Array();
	this.label = " " + label;
	window.menus[this.label] = this;
	window.menus[window.menus.length] = this;
	if (!window.activeMenus) window.activeMenus = new Array();
}


function RunJavascript()
{
	
	ShowToTop();
} 


function ShowToTop()
{//显示是否返回页首的链接
	var sh = document.body.scrollHeight || document.documentElement.scrollHeight;
	
	if($('divtotop')!=null)
	{
		if(sh>1000)
		{
			$('divtotop').style.display="";
		}
		else
		{
			$('divtotop').style.display="none";
		}
	}
} 

function SelectInfoDiv(i_sel)
{
	for(i=1;i<4;i++)
	{
		$('divicon'+i).className="nodsp";
		$('lit'+i).className="";
		
	}
	$('divicon'+i_sel).className="";
	$('lit'+i_sel).className="current";
}



function ShowClassBar(i_id)
{
	var evt = window.event || arguments.callee.caller.arguments[0]; // 获取event对象
  var srcElement = evt.srcElement || evt.target;  // 获取触发事件的源对象
  
		if($('ul'+i_id).className=="")
		{
			$('ul'+i_id).className="nodsp";
			srcElement.src=srcElement.src.replace("minus","plus");
		}
		else
		{
			$('ul'+i_id).className="";
			srcElement.src=srcElement.src.replace("plus","minus")	;
		}
}

function setNavBar(s_id)
{

	
}

function ServiceTab(selobj,i_sel)
{
	liObj.style.backgroundImage ="";
	liObj=selobj;
	liObj.style.backgroundImage ="url(/template/images/snbg.gif)";
	
	for(i=0;i<8;i++)
	{
		$('divli'+i).style.display="none";	
	}
	
	
	$('divli'+i_sel).style.display="";	
	
}


function ChangeAd(i_sel)
{
	
	
	if(isIE())
	{
		imgflash.filters.blendTrans.apply();
	  document.images.imgflash.src = eval("img"+i_sel+".src");
	  imgflash.filters.blendTrans.play();
	}
	else
	{
		$('imgflash').src="/template/images/index"+i_sel+".jpg";	
	}	
}

var img1 = new Image();
var img2 = new Image();
var img3 = new Image();
//切换首页图片
function LoadImgAd()
{
	
		img1.src = "/template/images/index1.jpg" 
		
		img2.src = "/template/images/index2.jpg" 
		
		img3.src = "/template/images/index3.jpg" 
}

var i_liselect=-1;
function ChangeClass(i_sel)
{
	var obj=$('ulcenter').childNodes(i_sel);
	var i_loc=new Array(5,185,383,573,751)
	
	if(i_liselect!=-1)
	{
		$('ulcenter').childNodes(i_liselect).style.background="";
		$('ulcenter').childNodes(i_liselect).style.color="#E0E0E0";
		$('divclass'+(i_liselect+1)).style.display="none";
	}
	
	i_liselect=i_sel;
	$('ulcenter').childNodes(i_liselect).style.background="url(/template/images/cenlibg.gif) no-repeat 1px 0px";
	$('ulcenter').childNodes(i_liselect).style.color="#000000";
	$('divclass'+(i_liselect+1)).style.display="";
	
	$('divcentsel').style.marginLeft=i_loc[i_sel];
	
}

function ServiceOpen()
{
	if($('spnonline')!=null)
	{
		//联系我们页面
		$('spnonline').innerHTML="Online. <a href='javascript:OpenService(0)'>Start Chat</a>.";
	}
	
	if($('spnquo')!=null)
	{
		$('spnquo').innerHTML="<a href='javascript:OpenService(0)'><img src='/template/images/chaton2.gif' /></a>";
	}
	
	if($('imgchat')!=null)
	{
		$('imgchat').src="/template/images/chaton.gif";
		$('spnchat').innerHTML="<a href='javascript:OpenService(0)' >Chat Online</a>";
	}
}

function ServiceClose()
{
	if($('spnonline')!=null)
	{
		
		$('spnonline').innerHTML="Offline.Please contact us with another method.";
	}	
	
	
	if($('spnquo')!=null)
	{
		$('spnquo').innerHTML="<img src='/template/images/chatoff2.gif' />";
	}
	
	if($('imgchat')!=null)
	{
		$('imgchat').src="/template/images/chatoff.gif";
		$('spnchat').innerHTML="Chat Online";
	}
}


