//rollovers for l-h nav
var im_path = "/keyskills/images/apps/";
bbcjs.images.rolls.home = im_path + "nav_homepage_roll.gif";
bbcjs.images.rolls.appr = im_path + "nav_apprentices_roll.gif";
bbcjs.images.rolls.empl = im_path + "nav_employers_roll.gif";
bbcjs.images.rolls.tuto = im_path + "nav_tutors_roll.gif";
bbcjs.images.rolls.prof = im_path + "nav_profiles_roll.gif";
bbcjs.images.rolls.keys = im_path + "nav_keyskills_roll.gif";
bbcjs.images.rollPrep();
//end rollovers for l-h nav

//css swapping
bbcjs.css.swap.url = '/webwise/computertutor/includes/main.css';
bbcjs.css.swap.profiles = [bbcjs.css.targets.win + bbcjs.css.targets.nav];
bbcjs.css.swap.load();
//end css swapping

//email validation
bbcjs.forms.required.email = bbcjs.regex.email;
bbcjs.forms.req_err.email = 'Please enter a valid email address ...';
//end email validation

//flash popup
var flash_popup = new bbcjs.win.Window("", 600, 440);
//flash_popup.features.scrollbars = "no";	
//flash_popup.features.resizable = "no";
flash_popup.features.status = "no";
flash_popup.features.menubar = "no";
flash_popup.features.location = "no";
flash_popup.features.left = 250;
flash_popup.features.top = 250;
flash_popup.features.screenX = 250;
flash_popup.features.screenY = 250;
//end flash popup
	
//send newsletter
function doNewsLetter(form){
if (! bbcjs.forms.validate(form)){
	return false;
	}else{
	newsletter_popup.open();	
	form.submit();
	return false;
	}
}

//survey popup
var newsletter_popup = new bbcjs.win.Window("/keyskills/apps/please_wait.shtml",200, 200);
newsletter_popup.name = "newsletter_popup";
newsletter_popup.features.scrollbars = "no";	
//newsletter_popup.features.resizable = "no";
newsletter_popup.features.status = "no";
newsletter_popup.features.menubar = "no";
newsletter_popup.features.location = "no";
newsletter_popup.features.left = 250;
newsletter_popup.features.top = 250;
newsletter_popup.features.screenX = 250;
newsletter_popup.features.screenY = 250;
//end survey popup

function fullScreenPop(url) {
	var w = 600, h = 400; // default sizes and fullscreen with titlebar
	if (window.screen) {
		w = window.screen.availWidth - 12;
		h = window.screen.availHeight - 48;
		//alert(w);
		//alert(h);
	}
	pop_window = window.open(url+"?h="+window.screen.availHeight,'fullwin','width=' + w + ',height=' + h + ',left=0,screenX=0,top=0,screenY=0,fullscreen=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes');
	self.name = "main";
	if (window.focus) {
		setTimeout('pop_window.focus();',1000);
	}
}
