//Headwind 2004-10-13

var strBefore = "FeedBack Information - mmkey.com\n！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！\n\nConfirm: ";
var strEnd = "\n\n\n\t\t　　　　　Headwind@2004 mmkey.com\n";

function CheckNull(el) {
	if(document.all(el).value == "" ) {
		//alert("Error: What Do You Want?! ");
		document.all(el).focus();
		return false;
	}
}

function Confirm(str){
	if(!confirm(strBefore + str + strEnd)) return false;
}

function Alert(str){
	window.alert(strBefore + str + strEnd);
}

function IsNumber(){
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}

function GetFileName(url, opt){
	document.write(url.substr(url.lastIndexOf(opt)+1));
}

function ShowWMP(url,w,h,sid){
	var sidHTML=document.all(sid).innerHTML;
	if (sidHTML.indexOf("OBJECT")+1){
		wmp="Source URL: <a href=\""+url+"\" target=_blank>"+url+"</a>";
	}
	else{
		wmp="<OBJECT classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' type='application/x-oleobject' standby='Loading...' width="+w+" height="+h+"><PARAM NAME='FileName' VALUE='"+url+"'><param name='ShowStatusBar' value='-1'><PARAM NAME='AutoStart' VALUE='false'><EMBED type='application/x-mplayer2' SRC='"+url+"' AutoStart=false width="+w+" height="+h+"></EMBED></OBJECT>";
	}
	document.all(sid).innerHTML = wmp;
}

function visitor(){
  window.open("Count.asp?to=Count","BlogCounter","width=402,height=259,left=200,top=200");
}

function hiddenarea(tohidden1){
	tohidden=document.all(tohidden1)
	if(tohidden.style.display=='none'){
		tohidden.style.display='';
	}
	else{
		tohidden.style.display='none';
	}
}

function runEx(cod1) {
 cod=document.all(cod1)
  var code=cod.value;
  if (code!=""){
  var newwin=window.open('','','');  
  newwin.opener = null 
  newwin.document.write(code);  
  newwin.document.close();
	}
}

function JM_cc(ob){
var obj=document.all(ob); if (obj) { 
obj.select();js=obj.createTextRange();js.execCommand("Copy");}
}

function ImgLoad(aImg){ 
	var aWidth = 500;
	var aHeight = 300;
	var img=new Image(); 
	aImg.style.cursor='hand';
	img.src=aImg.src; 
	if(img.width/img.height>5/4){
		if(img.width>=aWidth){ 
			aImg.width=aWidth; 
			aImg.height=img.height*aWidth/img.width; 
		}
	}
	else{ 
		if (img.height>aHeight){
		aImg.height=aHeight; 
		aImg.width=img.width*aHeight/img.height;  
		}
	}  
} 

function ImgClick(aImg)
{
	window.open(aImg.src)
}

