function addfocus() {
	document.getElementById('username').focus();
}

function tshirt(comming,image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('tshirts_popup.php?time='+comming+'&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}

function rollup(image){
	var theWidth = "300";
	var theHeight = "750";
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=rollup&image='+image,'pics','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}

function poster(verz,image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=poster&verz='+verz+'&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}

function logo(image,szel,mag) {
	var theWidth = szel/4;
	var theHeight = mag/4;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=logo&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}

function product(image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=product&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}

function new_brand_flyers_en(verz,image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=new_brand_flyers_en&verz='+verz+'&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}

function new_product_flyers_en(verz,image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=new_product_flyers_en&verz='+verz+'&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
		reWin.focus();
}

function new_brand_flyers_de(verz,image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=new_brand_flyers_de&verz='+verz+'&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}
function new_product_flyers_de(verz,image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=new_product_flyers_de&verz='+verz+'&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}


function new_product_flyers_fr(verz,image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=new_product_flyers_fr&verz='+verz+'&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}
function new_brand_flyers_fr(verz,image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=new_brand_flyers_fr&verz='+verz+'&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}

function new_brand_flyers_es(verz,image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=new_brand_flyers_es&verz='+verz+'&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}	

function new_product_flyers_es(verz,image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=new_product_flyers_es&verz='+verz+'&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}


function advertisements(verz,image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=advertisements&verz='+verz+'&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}

function web_banners(cat, name, i, f) {
	var theWidth = 1000;
	var theHeight = 500;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('web_banner.php?cat='+cat+'&name='+name+'&i='+i+'&f='+f,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}
function web_banners_lang(verz,image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('showPoster.php?mod=poster&verz='+verz+'&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
}

function partner(brand,image,szel,mag) {
	var theWidth = szel;
	var theHeight = mag;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+""; 
	reWin=window.open('popup.php?mod=partner&brand='+brand+'&image='+image,'bcc','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+'');
	reWin.focus();
}

function checkform() {

	var name = document.getElementById("name").value.trim();
	var email = document.getElementById("email").value.trim();
	var country = document.getElementById("country").value;

	if ((name == "") || (email == "")) {
		alert("The filling in of the fields is obligatory!");
		return false;
	}
	if (country == "choose") {
		alert("Please choose your country!");
		return false;
	}
	
	var re_mail=/^([a-zA-Z0-9_\.])+([\-]?[a-zA-Z0-9]+)*@([a-zA-Z0-9])([a-zA-Z0-9_\.-])+(\.[a-zA-Z]{2,4})$/;
	var mailfield = document.getElementsByName("email");

	if(!re_mail.test(mailfield[0].value)) {
		alert("The e-mail address you have provided is incorrect!");
		return false;
	}

	return true;
}

function hover_in(id, image) {
	document.getElementById(id).style.background = "url(tshirt/small/"+image+")";
}
function hover_out(id, image) {
	document.getElementById(id).style.background = "url(tshirt/small/"+image+")";
}

