var isopera = typeof window.opera != 'undefined';
var isie = typeof document.all != 'undefined'  	&& !isopera && navigator.vendor != 'KDE';
var issafari = navigator.vendor == 'Apple Computer, Inc.';

window.onerror = function() { 
	return true; 
} 

// form text input box text change */
function MM_setTextOfTextfield(objId,x,newText) { //v9.0
  with (document){ if (getElementById){
    var obj = getElementById(objId);} if (obj) obj.value = newText;
  }
}

// Opens a pop up window
function popup(url) {
	mywin = window.open(url,"win","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,bgcolor=000000,width=500,height=500");
	mywin.focus();
}

// allows people to bookmark site when using IE, Netscape or Firefox
function bookmark(title, url){
	if (document.all)
		window.external.AddFavorite(url, title);
	else if (window.sidebar)
		window.sidebar.addPanel(title, url, "")
}

// updated bookmark script
function setBookmark(title, url) {	
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,'');
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); 
	}
	else if(window.opera && window.print) { // Opera Hotlist
		return true; 
	}
}

// set the homepage
function setHomepage(url) {
	if (document.all) {
		document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage(url);
	}
	else if (window.sidebar) {
		if(window.netscape) {
			 try {  
				netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');  
			 }  
			 catch(e) {  
				alert('Your browser has prevented this action. Please set us as your homepage directly from your browser.');         }
			 } 
		var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
		prefs.setCharPref('browser.startup.homepage','http://www.asp.net/130.aspx');
	}
}

// submit search results
function searchSubmit(i) {
	document.searchresults.q.value = i;
	status = "Please Wait...";	
	document.searchresults.submit();
}

// Headlines tab
function showTab(tabId, tabNo) {
	var tabCollection=document.getElementById(tabId);
	tabCollection.className=tabId+tabNo+'Visible';
}

// jump to url
function jumpUrl(targ,selObj,restore){
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  	if (restore) selObj.selectedIndex=0;
}