
/* Open popup-window */

function popup (url, name, w, h, scroll, resize) {
	var wMargin = 20;
	var hMargin = 20;
	var settings;
	if (w > (screen.width - wMargin)) w = screen.width - wMargin;
	if (h > (screen.height - hMargin)) h = screen.height - hMargin;
	
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;

	wint /= 4;
	
	settings  = 'height='+h+',';
	settings += 'width='+w+',';
	settings += 'dependent=yes,';
	settings += 'top='+wint+',';
	settings += 'left='+winl+',';
	settings += 'scrollbars='+scroll+',';
	settings += 'resizable='+resize+'';

	infowin = window.open(url, name, settings);
	infowin.focus();
}

function register_username(parent) {
	var url= "../popup/regusername.php"; 
	var name="register_username";
	popup (url, name, 400, 450, "Yes", "no");
	parent.href="";
}

function register_password(parent) {
	var url= "../popup/regpassword.php"; 
	var name="register_password";
	popup (url, name, 400, 450, "Yes", "no");
	parent.href="";
}

function register_email(parent) {
	var url= "../popup/regemail.php"; 
	var name="register_email";
	popup (url, name, 400, 450, "Yes", "no");
	parent.href="";
}

function user_condition(parent) {
	var url= "../popup/usercondition.php"; 
	var name="blickar_user_condition";
	popup (url, name, 400, 450, "Yes", "no");
	parent.href="";
}

function secrecy(parent) {
	var url= "../popup/secrecy.php"; 
	var name="blickar_secrecy";
	popup (url, name, 400, 400, "Yes", "no");
	parent.href="";
}

function press(parent) {
	var url= "../popup/press.php"; 
	var name="blickar_press";
	popup (url, name, 500, 450, "Yes", "no");
	parent.href="";
}

function contact(parent) {
	var url= "../popup/contact.php"; 
	var name="blickar_contact";
	popup (url, name, 400, 195, "no", "no");
	parent.href="";
}

function tipsa(parent) {
	var url= "../popup/tipsa.php"; 
	var name="blickar_contact";
	popup (url, name, 380, 266, "Yes", "no");
	parent.href="";
}

function minablickarpopup(parent)
{
 var url="../popup/minaBlickarpopup.php";
 var name ="Mina_blickar";
 popup(url,name,550,500,"Yes", "no");
 parent.href="";
}

function CVCpopup(parent)
{
 var url="../popup/CVC.php";
 var name ="CVC";
 popup(url,name,380,300,"Yes", "no");
 parent.href="";
}

function studentPopup(parent) {
	var url= "../popup/student.php"; 
	var name="blickar_contact";
	popup (url, name, 380, 300, "Yes", "no");
	parent.href="";
}

function fritjanstPopup(parent){
	var url= "../popup/fritjanst.php";
	var name="fritjanst";
	popup (url, name, 480, 300, "Yes", "no");
	parent.href="";
}

function creditsPopup(parent) {
	var url= "../popup/credits.php"; 
	var name="blickar_credits";
	popup (url, name, 450, 375, "Yes", "no");
	parent.href="";
}


