window.moveTo(0,0);
window.resizeTo(screen.width, screen.height - 35);
window.onunload = function(){ MAPopUp.close();	}

function check_email(src) {
	var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
	return regex.test(src);
}

function check_form(frm){
	if(frm.name.value.length == 0){							// Check name
		alert("The [Name] field has to be filled in."); 				frm.name.focus();		return false;	
	}
	if(frm.email.value.length == 0){						// Check Email
		alert("The [Email] field has to be filled in.");				frm.email.focus();		return false;
	} else if(!check_email(frm.email.value)){
		alert("The [Email] field does not contain a valid address.");	frm.email.focus();		return false;
	}

	return true;
}

function PNPopUp(){
	this.win = null;
}
PNPopUp.prototype.open = function(url, l, t, w, h){
	this.close();
	var sFeatures = 'left='+l+',top='+t+',screenX='+l+',screenY='+t+',width='+w+',height='+h;
	this.win = window.open(url, 'pnpopupwin', sFeatures);
}
PNPopUp.prototype.close = function(){
	if(this.win && !this.win.closed) this.win.close();
	this.win = null;
}
var MAPopUp = new PNPopUp();

function openRadio(){
	MAPopUp.open('nationalcarrental.mp3?autostart=true', 100, 100, 300, 100);
}
