//This function is a universial Window Opener.
//The last comment is how to use the function properly.
var win= null;
function openNewWin(page,name,w,h,scroll){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
settings='height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=no,location=no,status=no,menubar=no,resizable=no,dependent=no'
win=window.open(page,name,settings)
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
//Reload the current page after opening the new window
//window.location.reload();
}
//<a href="javascript:openNewWin('http://www.domain.com','Window_Name','width','height','scroll_y_or_n')" onfocus="blur()">Image or Text</a>

function openNewWinStat(page,name,w,h,scroll){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
settings='height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=no,location=no,status=yes,menubar=no,resizable=no,dependent=no'
win=window.open(page,name,settings)
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
//Reload the current page after opening the new window
//window.location.reload();
}

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

