function creatShowObj(){
if(window.ActiveXObject){
	document.write('<style type="text/css">');
	document.write('a.newShowPreview{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);}');
	document.write('</style>');
}
document.write('<object classid="clsid:C14D003A-DA41-4FEE-8204-62A94EAA29D1" id="GLAvatar" width="0" height="0" CODEBASE="http://bbs.ourgame.com/image/GLWebAvt.cab#version=2,2,0,33" type="application/x-mimetype" VIEWASTEXT>');
document.write('<param name="_Version" value="65536">');
document.write('<param name="_ExtentX" value="5318">');
document.write('<param name="_ExtentY" value="8017">');
document.write('<param name="_StockProps" value="0">');
document.write('</object>');
}

function PreviewImg(imgFile, name, position) {
    var newPreview=document.getElementById("newPreview_"+name);
	if(window.ActiveXObject){
		newPreview.className = "newShowPreview";
		newPreview.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgFile;
	}
	with(newPreview){
		href='http://gameshow.ourgame.com';
		newPreview.target='_blank';
		style.display='block';
		style.width=(position=='index')?'100px':'150px';
		style.height=(position=='index')?'120px':'190px';
		style.cursor='pointer';
	}
	return false;
}

//ÁªÖÚÐãÏÔÊ¾
function show(user, showID, pid, position) {
	var GLAvatar=document.getElementById("GLAvatar");
	var resize=(position=='index')?"width:100px;height:120px":"width:150px;height:190px";
	if(window.ActiveXObject){
		document.write('<a id="newPreview_'+pid+'"></a>');
		if (user.indexOf("*") > -1) {
		//if (user.indexOf("*") == 0) {
			document.write('<a id="newPreview_'+pid+'" style="display:block;background:url(/photo/admin.jpg) no-repeat center top;'+resize+'"></a>');
			return false;
		}else{
	  		GLAvatar.SetSex(1);
			this.sPath=(position=='index')?GLAvatar.SaveUserImage2(user,showID,0, 0, 0, 0, 100, 120):GLAvatar.SaveUserImage2(user,showID,0, 0, 0, 0, 150, 190);
			return PreviewImg(this.sPath, pid, position);
		}
	}else{
		document.write('<a href="http://gameshow.ourgame.com" id="newPreview_'+pid+'" style="display:block;background:url(/photo/default.gif) no-repeat center center;'+resize+';cursor:pointer" target="_blank"></a>');
		return false;
	}

}
creatShowObj();



function flashshow(key, values) {
       document.write('<div  style="width:200px; height:150px; background:#F00;" id="flashContent" >');
    var swfVersionStr = "10.2.0";
    var xiSwfUrlStr = "/playerProductInstall.swf";
    var flashvars = {};
    var params = {};
    params.quality = "high";
    params.bgcolor = "#ffffff";
    params.allowscriptaccess = "sameDomain";
    params.allowfullscreen = "true";
    params.FlashVars = "" + key + "=" + values + "";

    var attributes = {};
    attributes.id = "LZShow";
    attributes.name = "LZShow";
    attributes.align = "middle";
    swfobject.embedSWF("/LZShow.swf", "flashContent", "150", "190", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes);
    swfobject.createCSS("#flashContent", "display:block;text-align:left;");
       document.write(' </div>');
}
