//用于注册登录以及购物车窗口的打开
function rewindow(url, width, height){
	var Win = window.open(url,"rewindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no,status=no' );
}
//用于图片的自动缩放
function resizepic(thispic) 
{ 
if(thispic.width>500) thispic.width=500; 
} 
function bbimg(o) 
{ 
  var zoom=parseInt(o.style.zoom, 10)||100; 
  zoom+=event.wheelDelta/12; 
  if (zoom>0) o.style.zoom=zoom+'%'; 
  return false; 
}
//用于展开匿名评论
function chanSele(){
	if(document.getElementById("plconfig").style.display=="none"){
		document.getElementById("plconfig").style.display="";
	}
	else{
		document.getElementById("plconfig").style.display="none";
	}
}
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);
  function GetObj(objName){
   if(document.getElementById){
    return eval('document.getElementById("' + objName + '")');
   }else if(document.layers){
    return eval("document.layers['" + objName +"']");
   }else{
    return eval('document.all.' + objName);
   }
  }
  function ADMenu(index,flag){
   for(var i=0;i<6;i++){/* 最多支持9个标签 */
    if(GetObj("ADcon"+i)&&GetObj("ADm"+i)){
     GetObj("ADcon"+i).style.display = 'none';
     GetObj("ADm"+i).className = "ADmenuOff";
    }
   }
   if(GetObj("ADcon"+index)&&GetObj("ADm"+index)){
    GetObj("ADcon"+index).style.display = 'block';
    GetObj("ADm"+index).className = "ADmenuOn";
   }
  }
//过滤IE的虚框Flash调用函数
function viewMediaPlayer(sURL, sName, sFeatures){ 
	var WMPCID = "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"; 
	var sFeature; 
	var sWidth  = "100%"; 
	var sHeight  = "100%"; 
	var pmBoolean; 
	var sTempArray; 
	var sParamTag = ""; 

	sFeature = sFeatures.split(/\s*,\s*/); 
	for (var i=0; i< sFeature.length ; i++) { 
		sTempArray = sFeature[i].split(/\s*=\s*/); 
		if (sTempArray[0].toLowerCase() == "width"){ 
			//3Dàì 
			sWidth = sTempArray[1]; 
		} else if (sTempArray[0].toLowerCase() == "height"){ 
			sHeight = sTempArray[1]; 
		} else { 
			if (sTempArray[1].toLowerCase() == "yes" || sTempArray[1] == "1" || sTempArray[1].toLowerCase() == "true"){ 
				pmBoolean = "true"; 
			} else if (sTempArray[1].toLowerCase() == "no" || sTempArray[1] == "0" || sTempArray[1].toLowerCase() == "false"){ 
				pmBoolean = "false"; 
			} else { 
				pmBoolean = sTempArray[1]; 
			}
			sParamTag = "<PARAM NAME='"+sTempArray[0]+"'VALUE='" + pmBoolean + "'>\n"+sParamTag; 
		}
	} 
	document.write("<OBJECT ID='"+sName+"' NAME='"+sName+"' CLASSID='"+WMPCID+"' WIDTH='"+sWidth+"' HEIGHT='"+sHeight+"' >"); 
	document.write("<PARAM NAME='URL' VALUE='" + sURL + "'>"); 
	document.write(sParamTag); 
	document.write("</OBJECT>"); 
} 
function  viewFlash(sURL, sName, sFeatures){ 
	var FLASHCAB = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"; 
	var FLASHCID = "CLSID:D27CDB6E-AE6D-11CF-96B8-444553540000"; 
	var FLASHVER = "8,0,0,0"; 
	var sFeature; 
	var sWidth  = "100%"; 
	var sHeight  = "100%"; 
	var pmBoolean = "false"; 
	var sTempArray; 
	var sParamTag = ""; 

	sFeature = sFeatures.split(/\s*,\s*/); 
	for (var i=0; i< sFeature.length ; i++) { 
		sTempArray = sFeature[i].split(/\s*=\s*/); 
		if (sTempArray[0].toLowerCase() == "width"){ 
			//3Dàì 
			sWidth = sTempArray[1]; 
		} else if (sTempArray[0].toLowerCase() == "height"){ 
			sHeight = sTempArray[1]; 
		} else { 
			if (sTempArray[1].toLowerCase() == "yes" || sTempArray[1] == "1" || sTempArray[1].toLowerCase() == "true"){ 
				pmBoolean = "true"; 
			} else if (sTempArray[1].toLowerCase() == "no" || sTempArray[1] == "0" || sTempArray[1].toLowerCase() == "false"){ 
				pmBoolean = "false"; 
			} else { 
				pmBoolean = sTempArray[1]; 
			} 
			sParamTag = "<PARAM NAME='"+sTempArray[0]+"'VALUE='" + pmBoolean + "'>\n"+sParamTag; 
		} 
	} 
	document.write("<OBJECT ID='"+sName+"' NAME='"+sName+"' CLASSID='"+FLASHCID+"' CODEBASE='"+FLASHCAB+"#version="+FLASHVER+"' WIDTH='"+sWidth+"' HEIGHT='"+sHeight+"'>"); 
	document.write("<PARAM NAME='movie' VALUE='" + sURL + "'>"); 
	document.write("<PARAM NAME='wmode' VALUE='transparent'>"); 
	document.write("<PARAM NAME='wmode' VALUE='wmode'>"); 
	document.write(sParamTag); 
	document.write("<EMBED SRC='"+sURL+"' MENU='false' WIDTH='"+sWidth+"' HEIGHT='"+sHeight+"' ID='"+sName+"' NAME='"+sName+"' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer' />") 
	document.write("</OBJECT>"); 
}
function rewindow(url, width, height){
	var Win = window.open(url,"rewindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no,status=no' );
}
/*
页面调用方法
<script language="JavaScript">
<!-- 
viewFlash("1.swf", "maintop_menu_FLASH", "width=814, height=492, align=middle, allowScriptAccess=sameDomain, bgcolor=#F8F0D8, menu=false, quality=high"); 
//--></script>

*/
