document.write('<script type="text/javascript" src="res/js/swfobject.js"><\/script>');

document.write('<!--[if IE ]><style type=\"text/css\">#designheader img { height:123px; }<\/style><![endif]-->');

var _selectedSubMenu = 1;
var _selectedImage = 1;

showCategory = function (cat, subcat) {
	document.location.href = "category.php?cat="+cat+"&sub="+subcat;
}

showImages = function (subcat) {
	document.location.href = "images.php?sub="+subcat;
}

updateModelImage = function (mid, id) {
	if ( _selectedImage != id ) {
			$("modelimage"+id).src = 'image.php?m='+mid+'&i='+id+'&w=55';
			$("modelimage"+_selectedImage).src = 'image.php?m='+mid+'&i='+_selectedImage+'&w=55&g=1';
			$("modelimagebig").getElementsByTagName("img")[0].src = 'image.php?m='+mid+'&i='+id+'&w=250';
			$("thumb1").href = 'image.php?m='+mid+'&i='+id+'&w=400';
			_selectedImage = id;			
	}
}

function checkMail(email) {  
	if(email == "")
		return false;  
	var usr    = "([a-zA-Z0-9][a-zA-Z0-9_.-]*|\"([^x80-xff1512\"]|[^x80-xff])+\")";  
	var domain = "([a-zA-Z0-9][a-zA-Z0-9._-]*.)*[a-zA-Z0-9][a-zA-Z0-9._-]*.[a-zA-Z]{2,5}";  
	var regex  = "^" + usr + "@" + domain + "$";  
	var rgx    = new RegExp(regex);  
	return rgx.exec(email) ? true : false;  
} 