function replaceImg(sourceUrl) {
		var img = new Image();
		img.src = sourceUrl;
		if(img.width>300){
			img.height=img.height/(img.width/300);
			img.width=300;
		}
		document.all.mainpic.width = img.width;
		document.all.mainpic.height = img.height;
		document.all.mainpic.src = sourceUrl;	
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
 window.open(theURL,winName,features);
}
function Company(SID) { //v2.0
window.open('http://corp.iance.com/Url.phtml?SID='+SID);
}
function email(SID) { //v2.0
window.open('http://corp.iance.com/email.phtml?SID='+SID);
}
function AddMsg(SID) { //v2.0
window.open('http://misc.iance.com/AddSms.phtml?o=Msg&SID='+SID);
}
function AddSms(SID) { //v2.0
window.open('http://misc.iance.com/AddSms.phtml?o=Odr&SID='+SID);
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function Report(ad_id, violationType){
 this.location.href='http://china.iance.com/BadReport.phtml?SID='+ ad_id+'&o=bad&type='+violationType;
}
function emptySearBox(searbox) {
    if (searbox.value.substring(0,3) == "请输入") {
      searbox.value='';      
    }	
}
function copyToClipboard()
{
  var d=document.all("source").value;
  window.clipboardData.setData('text', d);
  alert("你已复制链接及标题，请粘贴到QQ/MSN等发给好友!");
}

function js_callpage(url) {
	window.open('http://china.iance.com/SendMail.phtml?Url='+url,'od','width=408,height=558,resizable=0,scrollbars=0,status=no,toolbar=no,location=no,menu=no');
	return false;
}

function menu_display(t_id){//显示隐藏程序
        var t_id;//表格ID
        
        
                if (t_id.style.display == "none") {//如果为隐藏状态
                t_id.style.display="";//切换为显示状态
 
}else{
                t_id.style.display="none";//切换为隐藏状态
             
                }//换图

}

function showhide(t_id){//显示隐藏程序
        var t_id;//表格ID
 
                if (t_id.style.display == "none") {//如果为隐藏状态
                t_id.style.display="";//切换为显示状态
          
}else{
                t_id.style.display="none";//切换为隐藏状态

                }//换图

}
