function addBookmark(title,url) {
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	} else {
		alert('I\'m sorry, but we could not automatically add a bookmark to you list, please do so from the Bookmarks/Favorites menu');
	}
}
function newWindow(url){adWindow=window.open(url, 'adWin');adWindow.focus();}

//Some users will be viewing this from within a frame. We can't let them do this or their cookie won't be set
window.onload = function(){
	if(self != top){
		var Links = document.getElementsByTagName('A');
		for(i=0;i<Links.length;i++){
			Links[i].target="_blank";
		}
		var Forms = document.getElementsByTagName('FORM');
		for(i=0;i<Forms.length;i++){
			Forms[i].target="_blank";
		}
	}
}

// turn off pop up
function dpiu(){
	piu = false;
}
// pop up another internal site if user closes any page or presses the BCK/FWD button on their browser
function popitup(){
	//alert('close value is: '+piu);
	if( piu ){
		var newpow = "new"+Math.floor(Math.random()*1000);
		window.open(newpow, "", "toolbar=no,scrollbars=yes,location=no,status=no,menubar=yes,resizable=1,width=1024,height=800,left=0,top=0");
	}
}
// used for IE to handle events
function initialize(){
	// don't pop up a window if user submits a form
	//for(var i=0;i<document.forms.length;i++) {
		//document.forms[i].onsubmit = dpiu;
	//}
	// don't pop up a window if user clicks on a link
	//document.onclick = dpiu;
	//alert('load value is: '+piu);
}

if(document.all){
//IE
var piu = true;
//window.onload = initialize;
document.onclick = dpiu;
//alert('load2 value is: '+piu);
//window.onunload = popitup;
} else {
var piu = true;
window.captureEvents(Event.SUBMIT);
//window.onunload = popitup;
window.onsubmit = dpiu;
window.onclick = dpiu;
}