function emailPage(){
	popUpCenter('../tools/mailto.php?page='+location.href,500,500,'mailPage',true,false);
} 
function emailThisPage(){
	popUpCenter('tools/mailto.php?page='+location.href,500,500,'mailPage',true,false);
}
function hint(message){
  window.status=message;
  return true;
}
function popUpCenter(pageURL, height, width, windowName, scroll, resize){
    var popUpWindow, id;
    var wLeft, wTop;
    var scrollbars, resizable;
    if (windowName==''){
        now = new Date();
        id = now.getTime();
    }
    else id = windowName;
    wLeft =(window.screen.width/2) - (width/2 + 10)
    //half the screen width minus half the new window width (plus 5 pixel borders).
    wTop = (window.screen.height/2) - (height/2 + 50)
    //half the screen height minus half the new window height (plus title and status bars).
    scrollbars = scroll ? 'yes':'no';
    resizable = resize ? 'yes':'no';
    features='toolbar=no,location=no,directories=no,status=no,menubar=no,';
    features += 'height=' + height +  ',width=' + width;
    features += ',scrollbars=' + scrollbars + ',resizable=' + resizable;
    features += ',left='+ wLeft + ',top=' + wTop + ',screenX=' + wLeft + ',screenY=' + wTop;
    popUpWindow = window.open(pageURL,id,features);
    popUpWindow.focus();
    return id;
}
function switchURL(dropdown){
    var d = dropdown;
 	var v = d.options[d.selectedIndex].value; 
	 if(v!=''){
  		var url = v;  
  		if(v.indexOf('http://')==0) window.open(url);
  		else location.href= url;
 	}
} 