function Popup(apri) {
	var stile = "top=10, left=10, width=500, height=400, status=no, menubar=no, toolbar=no, scrollbars=yes";
	window.open(apri, "termsandconditions", stile);
}

/*
CLEAR ON FOCUS
*/
function clearText(thefield){
	if (thefield.defaultValue==thefield.value)
	thefield.value = ""
}
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

/* Functions to unobtrusively open links in new windows when className is "new-window" */

/* Create the new window */
function openInNewWindow(e) {
	var event;
	if (!e) event = window.event;
	else event = e;
	// Abort if a modifier key is pressed
	if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) {
		return true;
	}
	else {
		// Change "_blank" to something like "newWindow" to load all links in the same new window
	    var newWindow = window.open(this.getAttribute('href'), '_blank');
		if (newWindow) {
			if (newWindow.focus) {
				newWindow.focus();
			}
			return false;
		}
		return true;
	}
}

/*
Add the openInNewWindow function to the onclick event of links with a class name of "new-window"
*/
function getNewWindowLinks() {
	
	// Check that the browser is DOM compliant
	if (document.getElementById && document.createElement && document.appendChild) {
		// Find all links 
		var links = document.getElementsByTagName('a');
		var link;
		for (var i = 0; i < links.length; i++) {
			link = links[i];
			// Find all links with a class name of "non-html"
			if (/\bnew-window\b/.test(link.className)) {
				// append new window function to onclick & onkeypress events (for accessibility!)
				link.onclick = openInNewWindow;
				link.onkeypress = openInNewWindow;
			}
		}
		objWarningText = null;
	}
}



function getURLParam(strParamName){
  var strReturn = "";
  var strHref = window.location.href;
  if ( strHref.indexOf("?") > -1 ){
	var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
	var aQueryString = strQueryString.split("&");
	for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
	  if (
aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ){
		var aParam = aQueryString[iParam].split("=");
		strReturn = aParam[1];
		break;
	  }
	}
  }
  return unescape(strReturn);
}


startList = function() {
	var menuId = document.getElementById("menu1");
	var liId = document.getElementById("list1");
	var menuId2 = document.getElementById("menu2");
	var liId2 = document.getElementById("list2");
	//if (menuId){
	//	menuId.className="positionAndHide";
	//}
	if (liId){
		menuId.className+="positionAbsolute";
		liId.onmouseover=function() {
			menuId.className+=" sfhover";
		}
		liId.onmouseout=function(){
			menuId.className=menuId.className.replace(new RegExp("sfhover\\b"), "");
		}
	}
	if (menuId){
		var sfEls = menuId.getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
	if (liId2){
		menuId2.className+="positionAbsolute";
		liId2.onmouseover=function() {
			menuId2.className+=" sfhover";
		}
		liId2.onmouseout=function(){
			menuId2.className=menuId.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
	if (menuId2){
		var sfEls = menuId2.getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}

addLoadEvent(getNewWindowLinks);
addLoadEvent(startList);