function mOvr(src,clrOver,clrOver1)
{
	if (!src.contains(event.fromElement)) 
	{
		src.style.cursor = 'hand'; 
		src.bgColor = clrOver;
		src.style.color = clrOver1;
	}
}

function mOut(src,clrIn,clrIn1)
{
	if (!src.contains(event.toElement))
	{
		src.style.cursor = 'default';
		src.bgColor = clrIn; 
		src.style.color = clrIn1;
	}
}

function mClk(src)
{
	if(event.srcElement.tagName=='TD')
	{
		src.children.tags('A')[0].click();
	}
}

function doInit(username,userpoint,userprice,logined)
{
	if (logined)
	{
		try{
			_language["common-text1"] = _language["common-text1"].replace("{0}",username);
			_language["common-text1"] = _language["common-text1"].replace("{1}",userpoint);

			parent.document.getElementById("welcome").innerHTML = _language["common-text1"];
		}catch(e){;}
	}else{
		var Url = request("url");

		try{
			if (typeof(Url) == "undefined")
			{
				Url = parent.location.href;
			}

			parent.document.forms["frmLogin"].url.value = Url;
		}catch(e){;}
	}
}

/**
 * Object.IIf("1 = 1","on","off")
 * @Params 必选项。字符串匹配条件 
 * @Params 必选项。条件为真返回
 * @Params 必选项。条件为假返回
 * @Return 字符串
 */
function IIf(strParameter,blTrue,blFalse)
{
	this.blTrue = blTrue?blTrue:true;
	this.blFalse = blFalse?blFalse:false;
	
	if (strParameter)
	{
		return (blTrue);
	}else{
		return (blFalse);
	}
}

/*
 * 该功能类似 ASP 里的 Request,获取并分析URL的附带参数
 * @params 需要获取参数名称
 * @params 需要获取参数的地址
 */
function request(QueryString,strHref)
{
	var strParameter;
	strHref = strHref?strHref:window.location.href;

	if(strHref.search(/\?/)!=-1)
	{
		strHref=strHref.substr(strHref.search(/\?/)+1);
		strHref=strHref.split(/&/);
		for(var i = 0; i<strHref.length; i++)
		{
			if(strHref[i].search("^"+QueryString+"=")!=-1)
			{
				strParameter=strHref[i].substr(QueryString.length+1)
			}
		}
		
		return(strParameter);
	}
}

/*
 * 格式化货币样式
 * @params 类似VBSCRIPT里的FormatCurrency
 * @params 输入货币值
 */
function formatCurrency(num)
{
	num = num.toString().replace(/\$|\,/g,'');

	if(isNaN(num))

	num = "0";
	sign = (num == (num = Math.abs(num)));
	num = Math.floor(num*100+0.50000000001);
	cents = num%100;
	num = Math.floor(num/100).toString();

	if(cents<10)
	{
		cents = "0" + cents;
		for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
		{
			num = num.substring(0,num.length-(4*i+3))+','+
			num.substring(num.length-(4*i+3));
		}
	
	}

	return (((sign)?'':'-') + num);
}

/**
 * 根据后台控制屏蔽相应的客户端操作
 **/
function _filter_security()
{
	/**
	 * 屏蔽右键菜单
	 **/
	if (_menu == 1)
	{
		document.oncontextmenu = new Function("return false")

	}

	/**
	 * 屏蔽截屏等拷贝动作，复制粘帖也将被屏蔽
	 **/
	if (_screen == 1)
	{
		setInterval("clipboardData.setData('Text','Contnew.Network')",100);
	}

	/**
	 * 屏蔽页面保存功能
	 **/
	if (_save == 1)
	{
		document.write ("<noscript><iframe src='*.htm' style='display:none'></iframe></noscript>")
	}
}

/**
 * 帮助栏目菜单
 **/
		
function help_sub(id)
{
	for (i = 1;i<12;i++)
	{
		document.getElementById("help_q_"+i).className = "help_q";
		document.getElementById("help_a_"+i).style.display = "none";
	}
	document.getElementById("help_q_"+id).className = "help_q_over";
	document.getElementById("help_a_"+id).style.display = "";
}

/**
 * Google AdWords
 **/

var google_conversion_type = 'landing';
var google_conversion_id = 1061384400;
var google_conversion_language = "zh_CN";
var google_conversion_format = "1";
var google_conversion_color = "E6F3C8";

          
if (top.location != location) top.location.href = location.href;



// JavaScript

// Correctly handle PNG transparency in Win IE 5.5 or higher.
// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004

function correctPNG() 
   {
   for(var i=0; i<document.images.length; i++)
      {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText 
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle        
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
         img.outerHTML = strNewHTML
         i = i-1
         }
      }
   }
window.attachEvent("onload", correctPNG);

// JavaScript


