//定义flash与图片广告输出类
function PutongAdver_Class(){
	String.prototype.trim = function(){ 
		return this.replace(/(^\s*)|(\s*$)/g,""); 
	}
	this.ShowPutongAds=function(url,src,width,height,title,extname,basepath){
	var host = document.domain;
	if(host.indexOf("bbs.fangdr.com")==-1){
	basepath="";
	}
	var ext;
	ext=extname.trim();
	document.write('<div id="mimanputong" align="center">');
	if(ext=='swf'||ext=='SWF'){
		document.write(
		'<button style="width:'+width+'px;height:'+height+'px;background:transparent;border:0px;padding:0px;cursor:hand;margin:0px;" onfocus="this.blur();" onmousedown="adsclick(\''+url+'\')" onclick="window.open(\''+url+'\');">' + 
		'<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="'+basepath+src+'">'+
		'<param name="quality" value="high">'+
		'<param name="wmode" value="opaque" />'+
		'<embed src="'+basepath+src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'">'+
		'</embed>'+
		'</object>'+
		'</button>');
	}
	else{
		document.write(
		'<a href="'+url+'" alt="'+title+'" onmousedown="adsclick('+url+')" target="_blank">'+ 
		'<img src="'+basepath+src+'" width="'+width+'" height="'+height+'" alt="'+title+'" border="0"/>'+
		'</a>');
	}
	document.write("</div>");
	}
}
//创建广告输出实例,并完成广告输出
var PutongAdver=new PutongAdver_Class();
PutongAdver.ShowPutongAds('http://gz.fangdr.com/gzxf/1252307948673.html','/upload/ads/1273111345557.jpg','568','60','富力金港城','jpg','http://gz.fangdr.com');
