<!--
function newWindow(url,name,width,height,chrome) {
	var top = Math.round((screen.availHeight-height)/2);
	var left = Math.round((screen.availWidth-width)/2);

	newwindow = window.open(url,name,chrome+",height="+height+",width="+width+",top="+top+",left="+left);
	newwindow.focus();
}

function getemail(type) {
	if (type == "sales") 	safemail('sales','marketonepbs.com','sales@marketonepbs.com');
	if (type == "enquiries")safemail('enquiries','marketonepbs.com','enquiries@marketonepbs.com');
	if (type == "director")	safemail('merissa','marketonepbs.com','merissa@marketonepbs.com');
	if (type == "hr")		safemail('shelley','marketonepbs.com','shelley@marketonepbs.com');
	if (type == "typist")	safemail('helen','marketonepbs.com','helen@marketonepbs.com');
	if (type == "busdev")	safemail('debbie','marketonepbs.com','debbie@marketonepbs.com');
}

function safemail(name, domain, display) {
	displayed=(typeof(display)=="undefined") ? name+"@"+domain : display
	document.write('<a href=\"mailto:' + name + '@' + domain + '\">' + displayed + '</a>');
}

function date(target) {
	var now = new Date();
	var days = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
	var months = new Array ("January","February","March","April","May","June","July","August","September","October","November","December");

	var hours = now.getHours() 
	if (hours > 11) {
		if (hours > 12) hours = hours-12;
		suffix = "PM"
	}
	else suffix="AM";
	var minutes = now.getMinutes()
	if (minutes < 10) minutes = "0"+minutes
	var seconds = now.getSeconds()
	if (seconds < 10) seconds = "0"+seconds
	
	dateNow = months[now.getMonth()] +" "+ now.getDate() +", "+ now.getFullYear();
	timeNow = hours +":"+ minutes +":"+ seconds +" "+ suffix;
	target.value = dateNow +" "+ timeNow;
}

function setActiveMenu(id){
	document.getElementById(id).className='active';
}
function showMenu(id){
	var visible = document.getElementById(id).style.display == 'block';
	document.getElementById(id).style.display = visible ? 'none' : 'block';
}
//-->