// JavaScript Document
function ResetHeight(){
	parent.document.getElementById("main").height = document.body.scrollHeight ;
	
}

function ResetHeight2(name){
	parent.document.getElementById(name).height =document.body.scrollHeight;
}


function setHeight(iframe) {
	var frm = document.getElementById(iframe);
	var subWeb = document.frames ? document.frames[iframe].document : frm.contentDocument;
	if(frm != null && subWeb != null){
		frm.height = subWeb.body.scrollHeight;
	}
}

function setHeight2(fid,fname) {
	var frm = document.getElementById(fid);
	var subWeb = document.frames ? document.frames[fname].document : frm.contentDocument;
	if(frm != null && subWeb != null){
		frm.height = subWeb.body.scrollHeight;
	}
}

function isEmpty(name) {
	var ev = document.getElementById(name).value;
	if (ev != null && ev.length > 0) {
		return false;
	} else {
		return true;
	}
}
function onfocus(name) {
	document.getElementById(name).focus();
}
function isInt(){
	if (event.keyCode<48 || event.keyCode>57){ 
		event.returnValue=false;
	}
}

function xg(href,width,height){
	window.open(href,"","toolbar=no,location=yes,status=no,scrollbars=yes,menubar=no,resizable=yes,width="+width+",height="+height+",left="+(1024-width)/2+",top="+(700-height)/3);
}

function getFlash(w,h,url){
			var flash='<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="'+w+'" '
			+'height="'+h+'">'
			+'<param name="movie" value="'+url+'" />'
			+'<param name="quality" value="high" />'
			+'<embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object>';
	return flash;
	}
		
function getImages(w,h,url){
	var img='<img width="'+w+'" src="'+url+'" height="'+h+'"  border="0" />';
	return img;
}

function dl(left,top,right,a){
	document.write('<div id="dl_left"><table border="0" cellspacing="0" cellpadding="0" style="position:absolute; left:'+left+'px; top:'+top+'px; z-index:2px;"><tr><td width="110" height="300">'+
	a+'</td></tr><tr><td align="right"><img onMouseDown="hide_duilian();"  height="18" src="/ad/images/close.gif " width="18" border="0 "  style="cursor:pointer;"/></td></tr></table></div>');
	
	document.write('<div id="dl_right"><table border="0" cellspacing="0" cellpadding="0" style="position:absolute;right:'+right+'px; top:'+top+'px; z-index:2px;"><tr><td width="110" height="300">'+a+'</td></tr><tr><td align="right"><img onMouseDown="hide_duilian();"  height="18" src="/ad/images/close.gif " width="18" border="0 "  style="cursor:pointer;"/></td></tr></table></div>');
	
}