function BG_high(obj) { obj.style.backgroundColor='#F2FEFF'; }
function BG_low(obj) { obj.style.backgroundColor=''; }
function gotourl(url) {	document.location = url;}
var c_bg = "#FFC4C4"; var c_bgNO = "#FFFFFF";


	   var http = false;
if(navigator.appName == "Microsoft Internet Explorer") {   http = new ActiveXObject("Microsoft.XMLHTTP");
} else {   http = new XMLHttpRequest(); }
function esperar(vari){ 	document.getElementById(vari).innerHTML="<b>Loading, please wait...</b>";  }
function validate(reload,gourl,type,user,user2) {
 esperar(reload);   http.abort();
  http.open("GET", "module/"+ gourl +".php?type=" + type +"&name=" + user +"&name2=" + user2, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {       document.getElementById(reload).innerHTML = http.responseText;     }
  }
  http.send(null);
}
function validate2(reload,gourl,type,user,user2) {
 esperar(reload);   http.abort();
  http.open("GET", "../web/module/"+ gourl +".php?type=" + type +"&name=" + user +"&name2=" + user2, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {       document.getElementById(reload).innerHTML = http.responseText;     }
  }
  http.send(null);
}
function bannedKey(e){ // à©¾ÒÐµÑÇàÅ¢
	if(window.event){  	keyPressed = window.event.keyCode; // IE 
	}else{	keyPressed = e.which; // Firefox      
	}
	var textHI = "à©¾ÒÐµÑÇàÅ¢à·èÒ¹Ñé¹";
	var k = keyPressed;
	/* àªç¤¤ÕÂìÍÑ§¡ÄÉ a-z, A-Z */
	if ((k>=65 && k<=90) || (k>=97 && k<=122)) {    if(window.event){ window.event.returnValue = false;  alert(textHI); }else{ e.preventDefault();} }
	/* àªç¤¤ÕÂìä·Â ·Ñé§áºº non-unicode áÅÐ unicode */
	if ((k>=161 && k<=255) || (k>=3585 && k<=3675)) {    if(window.event){ window.event.returnValue = false; alert(textHI);  }else{ e.preventDefault();} }
	 // Slash "/"  "-"   46= .
	  if(( k ==25) || (k>=32 && k<=45) || ( k ==47) || ( k ==58) || ( k ==59)|| (k>=60 && k<=64)|| (k>=91 && k<=94) || ( k >=123&&k <=126)||  ( k ==109)||( k == 191) || ( k == 189) ||  ( k == 96)){  if(window.event){ window.event.returnValue = false; alert(textHI);  }else{ e.preventDefault();} }
}

function bannedKey2(e){  // à©¾ÒÐa-Z 1-0
	if(window.event){  	keyPressed = window.event.keyCode; // IE 
	}else{	keyPressed = e.which; // Firefox      
	}
	var k = keyPressed;var textHI = "à©¾ÒÐ a-z, A-Z áÅÐ 0-9 à·èÒ¹Ñé¹";
	/* àªç¤¤ÕÂìä·Â ·Ñé§áºº non-unicode áÅÐ unicode */
	if ((k>=161 && k<=255) || (k>=3585 && k<=3675)) {    if(window.event){ window.event.returnValue = false;  alert(textHI); }else{ e.preventDefault();} }
	 // Slash "/"  "-"
	  if(( k ==25) || (k>=32 && k<=47) || ( k ==58) || ( k ==59)|| (k>=60 && k<=64)|| (k>=91 && k<=94) || ( k >=123&&k <=126)||( k == 191) || ( k == 189) ||  ( k == 96)){  if(window.event){ window.event.returnValue = false; alert(textHI);  }else{ e.preventDefault();} }
} 

            
function Conf(text) { 
if(!text){text="";}
if (confirm("Â×¹ÂÑ¹¡ÒÃÅº¢éÍÁÙÅ\n"+text) ==true) { return true;}return false;}

function requestCrossDomain( site, callback ) {
	if ( !site ) {		alert('No site was passed.');		return false;	}
	var yql = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent('select * from html where url="' + site + '"') + '&format=xml&callback=?';
	$.getJSON( yql, 	function(data) {
	if ( data.results[0] ) {data = data.results[0];		if ( typeof callback === 'function') {callback(data);	} 	}
	else throw new Error('Nothing returned from getJSON.');	});

}
