function BG_ON(p)
{	document.getElementById(p).style.backgroundColor='#FFD98A';
}
function BG_OFF(p)
{	document.getElementById(p).style.backgroundColor='#FFF2D9';
}
function ShowProduct(product_link)
{	window.location.href="/"+product_link;
}
function PictureOpen(image_file, image_width, image_height)
{	window.open('/show_picture.php?image_file='+image_file+'&image_width='+image_width+'&image_height='+image_height,'','width='+image_width+',height='+image_height+',left='+((screen.width-image_width)/2)+',top='+((screen.height-image_height)/2));
}
function CheckLogin(f)
{	if (f.customer_login.value=="" || f.customer_login.value=="jméno")
	{	alert('Zadejte přihlašovací jméno ...');
		f.customer_login.focus();
		return false;
	}
	if (f.customer_password.value=="" || f.customer_password.value=="heslo")
	{	alert('Zadejte heslo ...');
		f.customer_password.focus();
		return false;
	}
	return true;
}

function CheckSearch(f)
{	if (f.vyhledat.value=="")
	{	alert('Zadejte řetězec pro vyhledávání ...');
		f.vyhledat.focus();
		return false;
	}
	return true;
}
function cislaplus(myfield, e, plus)
{	var key; var keychar;
	if (window.event) key = window.event.keyCode;
	else if (e) key = e.which; else return true;
	keychar = String.fromCharCode(key);
	if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) ) return true;
	else if ((("0123456789"+plus).indexOf(keychar) > -1)) return true; else return false;
}
function checkMail(email)
{	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	return filter.test(email);
}
function RemoveItem(product_id, attribute_arr)
{	window.location.href='scripts/recount_basket.php?product_id='+product_id+'&attribute_arr='+attribute_arr;
}
function SbmtManForm(manufacturer_name_url)
{	if (manufacturer_name_url)
		window.location.href="/vyrobce/"+manufacturer_name_url;	
	else
		window.location.href="/";	
}
function RemoveVoucher()
{	window.location.href='/scripts/discount_voucher.php?A=RemoveVoucher';
}
