<!--

	var oldcolor;

	function ov(obj,color){

		oldcolor=obj.bgColor;

		obj.bgColor=color;

	}

	function ou(obj){

		obj.bgColor=oldcolor;

	}

	function PopUp(url, name, width, height, center, resize, scroll, posleft, postop) {

		if (posleft != 0) { x = posleft }

		if (postop  != 0) { y = postop  }

		if (!scroll) { scroll = 1 }

		if (!resize) { resize = 1 }

		if ((parseInt (navigator.appVersion) >= 4 ) && (center)) {

			X = (screen.width  - width ) / 2;

			Y = (screen.height - height) / 2;

		}

		if (scroll != 0) { scroll = 1 }

		var Win = window.open( url, name, 'width='+width+',height='+height+',top='+Y+',left='+X+',resizable='+resize+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no');

	}
	
function checkNormalChar(stringIn) {
	 retval = false 
	 var i;
     for (i=0;i<=stringIn.length-1;i++) { 
     	 //cho phep nhung ky tu tu A->Z, a->z, 0->9,va cac ky tu @,_
	      if (((stringIn.charCodeAt(i) >= 48)&&(stringIn.charCodeAt(i) <= 57)) || ((stringIn.charCodeAt(i) >= 64)&&(stringIn.charCodeAt(i) <= 90)) || ((stringIn.charCodeAt(i) >= 97)&&(stringIn.charCodeAt(i) <= 122)) ||(stringIn.charCodeAt(i)==95) ||(stringIn.charCodeAt(i)==46) ||(stringIn.charCodeAt(i)==45)) { 
                retval = true;
      	  }else{
      	  		retval = false;
      	  		break;
         }
     }
	 return retval;
}
function checkEmail(stringIn) {
	if (stringIn.indexOf("@") < 1){
		return false;
	}else{
		st = stringIn.substr(stringIn.indexOf("@"));
		if(st.indexOf(".") == -1){
			return false;
		}else{
			if(!checkNormalChar(stringIn)){
				return false;
			}else{
				return true;
			}
		}
	}
}
	function share_twitter(){
		u=location.href;
		t=document.title;
		window.open("http://twitter.com/home?status="+encodeURIComponent(u))
	}
	function share_facebook(){
		u=location.href;
		t=document.title;
		window.open("http://www.facebook.com/share.php?u="+encodeURIComponent(u)+"&t="+encodeURIComponent(t))
	}
	function share_google(){
		u=location.href;
		t=document.title;
		window.open("http://www.google.com/bookmarks/mark?op=edit&bkmk="+encodeURIComponent(u)+"&title="+t+"&annotation="+t)
	}
	function share_buzz(){
		u=location.href;
		t=document.title;
		window.open("http://buzz.yahoo.com/buzz?publisherurn=DanTri&targetUrl="+encodeURIComponent(u))
	}
//-->

