
function PopupPic(sPicURL) { 
//sPicURL="com_lease/"+sPicURL;
    window.open( "popup.php?"+sPicURL, "","resizable=1,HEIGHT=600,WIDTH=600"); 
}


	function check_login(the_form){
		if (the_form.username.value == ""){
			window.alert('Chưa nhập tên đăng nhập !!!');
			the_form.username.focus();
			return false;
		}
		if (the_form.password.value == ""){
			window.alert('Chưa nhập mật khẩu !!!');
			the_form.password.focus();
			return false;
		}
		
		return true;
	}
	
	function check_lienhe(the_form){
		if (the_form.lh_hoten.value == ""){
			window.alert('Chưa nhập họ và tên !!!');
			the_form.lh_hoten.focus();
			return false;
		}
		if (the_form.lh_hoten.value.length < 5){
			window.alert('Họ và tên quá ngắn !!!');
			the_form.lh_hoten.focus();
			return false;
		}
		if (the_form.lh_email.value == ""){
			window.alert('Chưa có E-mail !!!');
			the_form.lh_email.focus();
			return false;
		}
		if (the_form.lh_title.value==0){
			alert("Vui lòng chọn chủ đề !!!");
			the_form.lh_title.focus();
			return false;
		}
		return true;
	}
	
function check_searchform(str)
	{
		if (str.value=='')
		{
			alert("Enter searching content!");
			str.focus;
			return false;
		}
		return true;
}
//-------------SHOP----------
function checkall(){
	for (var i = 0; i < document.DELETE.elements.length; i++) {
		if ( document.DELETE.all.checked==true ){
			document.DELETE.elements[i].checked = true;
		}
		else{
			document.DELETE.elements[i].checked = false;
		}
	}
}

	function mOvr(src) {
		if (!src.contains(event.fromElement)) {
			src.style.backgroundColor = '#fff3e7';
			src.style.cursor = 'hand';
		}

	}
	function mOut(src) {
		if (!src.contains(event.toElement)) {
			src.style.cursor = 'default';
			src.style.backgroundColor = '#ffffff';
		}
	}
	
function add_to_cart(domain,id) {
	p_id=id;
	var feature="width=550, height=400, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=no";
	window.open(domain+"/index.php?act=view&Option=add_to_cart&id="+p_id,"show",feature);
}
//-------------END SHOP----------
	