// JavaScript Document
$(document).ready(function(){ 
	set_height_site();						   
})
function set_height_site(){
	var left_content = parseInt($("div.left_content").height());
	var centercol = parseInt($("div.centercol").height());
	var set_height_right = parseInt($("div#set_height_right").height());
		//alert(left_content+'---'+centercol);													 
	if(left_content>centercol){
		$("#set_height_right").height(left_content -16 -centercol+set_height_right);
	}
	
}

var c=5;
var t;
var theDate = new Date();
s=theDate.getSeconds();

function ChangeUrl(site){
document.getElementById("txt").innerHTML=c;
	c-=1;
	
	url=site;
	t=setTimeout("ChangeUrl(url)",1000);
	stopCount(c,url);
}

function stopCount(c,link){
if(c==-1)
{clearTimeout(t);
location.href=link;}
}

function checkNum_bds(e,this_)
{
 var keynum
 var keychar
 var numcheck
 
 if(window.event) // IE
 {
  keynum = e.keyCode
 }
 
 else if(e.which) // Netscape/Firefox/Opera
 {
  keynum = e.which
 }
 if(keynum==undefined)
 {
 //  alert('AAAA');
  //Tab
  return true;
 }
 //alert(keynum)
 keychar = String.fromCharCode(keynum)
 //alert(keynum)

 numcheck = /\d/
 // 46 . 44 , 43 +,32 khoang trang; 44 day ,
 //return (numcheck.test(keychar) || (keynum == 8)||(keynum == 45));
 if((numcheck.test(keychar) || (keynum == 8) || (keynum == 9) ||(keynum == 45) ||(keynum == 41) ||(keynum == 40) ||(keynum == 46 && this_.value.indexOf(".")==-1 && this_.value != "")))
 //if((keynum >47 && keynum <58))
 {
	 
  return true
 }
 else
 {
  return false  
 }
}
