_gObjByID = function(id) {
	return document.getElementById(id);
}

//展示页面图片
function ShowImg(ImgId,ImgSrc)
{//alert(_gObjByID(ImgId).src);
    if(_gObjByID(ImgId).src=="")
    {
        _gObjByID(ImgId).src=_gObjByID(ImgSrc).innerHTML;
    }    
}


function SwapPaiHangShopDiv(DivKey,ID)
{//DivS1  DivB1
    for(var i=1;i<=6;i++)
       {
                   _gObjByID(DivKey + '_S' + i).style.display='';
                   _gObjByID(DivKey + '_B' + i).style.display='none';                        
        }
            _gObjByID(DivKey + '_S' + ID).style.display='none';              
            _gObjByID(DivKey + '_B' + ID).style.display='';
	    ShowImg("Img_"+DivKey+"_"+ID,"ImgSrc_"+DivKey+"_"+ID);
}

function printAD(url, _link, width, height,Class) {
	if(url == "") return false;
	var _t = url.substring(url.lastIndexOf(".")+1).toLowerCase();
	var _html = null;
	if(_t == "swf"){
		_html =	"<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\""+ width +"\" height=\""+ height +"\">"+
				"	<param name=\"movie\" value=\""+ url +"\" />"+
				"   <param name=\"wmode\" value=\"transparent\">"+
				"	<param name=\"quality\" value=\"high\" />"+
				"	<embed src=\""+ url +"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+ width +"\" height=\""+ height +"\"></embed>"+
				"</object>";
	}else{
		if(_link == "") _link="javascript:void(0);";
		_html = "<a href=\""+ _link +"\" Class=\""+Class+"\"><img src=\""+ url +"\" width=\""+ width +"\" height=\""+ height +"\" border=\"0\"/></a>"
	}
	document.write(_html);
}
