// JavaScript Document
function hide(name) {
	document.getElementById(name).style.display = "none";
}

function showe(name) {
	document.getElementById(name).style.display = "block";
}

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 setHeight3(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 + parseInt("20");
	}
}
function isEmpty(name) {
	var ev = document.getElementById(name).value;
	if (ev != null && ev.length > 0) {
		return false;
	} else {
		return true;
	}
}
function getFocus(ename) {
	document.getElementById(ename).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 showDialog(url) {
	showModalDialog(url, window, "dialogWidth:0px;dialogHeight:0px;help:no;scroll:no;status:no");
}

function adShow(){
		setTimeout('showe("ad33");',5000);	
		setTimeout('hide("ad33");',16000);
}

function inHtml(e,str){
	document.getElementById(e).innerHTML=str;
}

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 setFrame(frameUrl){
	if (window == top)top.location.href = frameUrl; 
}

function checkStr(str) {
	if (str != '') {
		if (str.match(/<^0-9a-zA-Z\u4E00-\u9FA5>/g,'')== null) { 
			return true;
		}
	}
	alert ("用户名只能由字母、数字、下划线组成"); 
	return false;
}
