function screen ()
{
if (document.getElementById('popup').style.display =='block')
{
document.getElementById('popup').style.height = document.body.scrollHeight;
if (document.body.clientWidth < 970) document.getElementById('popup').style.width = document.body.scrollWidth; else document.getElementById('popup').style.width = document.body.clientWidth;

if (document.body.clientWidth > 315) {document.getElementById('registration').style.left = (document.body.clientWidth-312)/2+'px'; document.getElementById('registration').style.top = (document.body.clientHeight-140)/2+'px';} else document.getElementById('registration').style.left=document.getElementById('registration').style.top='0px';
}
}


function buy ()
{
if (document.getElementById('popup').style.display=="block") document.getElementById('popup').style.display="none"; else {document.getElementById('popup').style.display="block"; pageTracker._trackPageview('/buy');}
screen ();
}

function checK(f) {
if (f.login.value=='') {alert("Error: E-Mail field is empty!");f.login.focus();}
else if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(f.login.value)){alert('Error: Wrong E-Mail!');f.eMail.select()}
else if (f.pass.value=='') {alert("Error: Password field is empty!");f.pass.focus();}
else if (f.pass.value.length < 4 || f.pass.value.length > 12) {alert("Error: Password must be between 4 and 12 characters");f.pass.focus();}
else if (f.cpass.value=='') {alert("Error: Retype Password field is empty!");f.cpass.focus();}
else if (f.cpass.value.length < 4 || f.cpass.value.length > 12) {alert("Error: Retype Password must be between 4 and 12 characters");f.cpass.focus();}
else if (f.pass.value!==f.cpass.value) {alert("Error: Passwords do not match!");f.cpass.focus();}
else document.form_reg.submit();
}