<!--
function openPlayer(ref,w,h) {

	if(!ref) {
	var ref1 = "/music_centre/player.php";
	} else {
	var ref1 = ref;
	}

	  var window_left = (screen.width-640)/2;
	  var window_top = (screen.height-480)/2;
	  var player = window.open(ref1,"TradeinfoPlayer",'width=' + w + ',height=' + h + ',scrollbars=no,status=no,top=' + window_top + ',left=' + window_left + '');
}

function closePlayer() {
 var ref = "/music_centre/player_close.php";
 openPlayer(ref,'5','5');
}

function check_ID_Window(ref) {
	  var window_left = (screen.width-640)/2;
	  var window_top = (screen.height-480)/2;
	  window.open(ref,"checkWin",'width=400,height=200,scrollbars=no,status=no,top=' + window_top + ',left=' + window_left + '');
}

function homepage_Popup(ref) {
	  var window_left = (screen.width-640)/2;
	  var window_top = (screen.height-480)/2;
	  window.open(ref,"Homepage",'width=720,height=582,scrollbars=no,status=no,top=' + window_top + ',left=' + window_left + '');
}

// Without scrollbars, no resizable
function customized_Popup1(ref,title,w,h) {
	  var window_left = (screen.width-640)/2;
	  var window_top = (screen.height-480)/2;
	  window.open(ref,title,'width=' + w + ',height=' + h + ',scrollbars=no,status=no,top=' + window_top + ',left=' + window_left + '');
}

// With scrollbars, resizable
function customized_Popup(ref,title,w,h) {
	  var window_left = (screen.width-640)/2;
	  var window_top = (screen.height-480)/2;
	  window.open(ref,title,'width=' + w + ',height=' + h + ',scrollbars=yes,resizable=yes,status=no,top=' + window_top + ',left=' + window_left + '');
}

function IsID(formname) {
     var form=eval("document." + formname);

     if(form.id.value.length < 4 || form.id.value.length > 15) {
         return false;
     }
     for(var i=0; i < form.id.value.length; i++) {
         var chr = form.id.value.substr(i,1);
         if((chr < '0' || chr > '9') && (chr < 'a' || chr > 'z') && (chr < 'A' || chr > 'Z')) {
            return false;
         }
     }
     return true;

}


function IsEmail(formname2) {
     var form2=eval("document." + formname2);

    if ((form2.email.value.indexOf("@") < 0) || (form2.email.value.indexOf(".") < 0)){
        return false;
   }
   return true;
}


function lost_checkInput(){
	var form = document.form1;
	   
	if(!form.email.value) {
	alert("Please enter your email address!");
	form.email.focus();
	return false;
	}
	if(!form.day.value) {
	alert("Please choose your Date of Birth!");
	form.day.focus();
	return false;
	}
	if(!form.month.value) {
	alert("Please choose your Date of Birth!");
	form.month.focus();
	return false;
	}
	if(!form.year.value) {
	alert("Please choose your Date of Birth!");
	form.year.focus();
	return false;
	}
	form.submit();
}

function askCheck(){
	var form = document.form;
	   
	if(!form.ask_pr.value) {
	alert("Please enter your asking price!");
	form.ask_pr.focus();
	return false;
	}
	form.submit();
}

function prCheck(){
	var form = document.form;
	   
	if(!form.start_pr.value) {
	alert("Please enter your asking price!");
	form.start_pr.focus();
	return false;
	}
	if(!form.reserve_pr.value) {
	alert("Please enter your reserve price!");
	form.reserve_pr.focus();
	return false;
	}
	form.submit();
}

function toDollor(form) {
var money = form.value;
var reg_ex = /^[0-9]+$|^[0-9]+[.]{1}[0-9]{2}$|^$/;

	if(!reg_ex.test(money)) {
    	alert("Please put a valid money format.(eg. 100 / 100.50)");
	form.focus();
	form.value="";
	return false;
	}
}

//-->
