var advancedSearchVisible = false

function layout()
	{
	if (advancedSearchVisible)
		{
		document.getElementById('advancedSearch').style.display = "none"
		toggleOnOff('on')				
		}
	else
		{
		document.getElementById('advancedSearch').style.display = "block"
		toggleOnOff('off')
		}
	}
		

// Toggle Advanced Search Panel
function toggleadvancedSearch()
	{	
	advancedSearchVisible = advancedSearchVisible ? false : true
	}
	
		
// Toggles the On/Off of the more search options link
function toggleOnOff(OnOrOff)
	{
	if (OnOrOff == 'on')
		document.images["linkTurnOnOffImage"].src = "images/adv_search_down.gif"
	else
		document.images["linkTurnOnOffImage"].src = "images/adv_search_up.gif"
	}	
			

function doASO()
	{
	layout()
	toggleadvancedSearch()
	HTTP_RequestASO("asohttp.asp?advancedSearchVisible=" + advancedSearchVisible)
	}
	

var http_requestASO

function HTTP_RequestASO(url) 
	{
	http_requestASO = false

	if (window.XMLHttpRequest) 
		{
		http_requestASO = new XMLHttpRequest()
		if (http_requestASO.overrideMimeType) http_requestASO.overrideMimeType('text/xml')
		} 
	else if (window.ActiveXObject) 
		{
		try 
			{http_requestASO = new ActiveXObject("Msxml2.XMLHTTP")} 
		catch(er) 
			{
			try {http_requestASO = new ActiveXObject("Microsoft.XMLHTTP")} 
			catch(er2) {}
			}
		}

	if (http_requestASO)	
		{
		http_requestASO.open('GET', url, true)
		http_requestASO.onreadystatechange = HTTP_WriteASO
		http_requestASO.send(null)
		}
	}

function HTTP_WriteASO()
	{
	var info
	 
	if (http_requestASO.readyState == 4 && http_requestASO.status == 200) 
		{
		info = http_requestASO.responseText
		}
	}

// Pop up window
function openWindow(url, name, rs, w, h) {
  var resize = "";
  if (rs==false) {
    resize = "resizable=no,";
  }
  popupWin = window.open(url, name,'' + resize + 'width=' + w + ',height=' + h+',toolbar=no, resizable=no, scrollbars=yes, status=yes');

  window.name = 'opener';
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// Thank You Window
function windowThankyou()
		{
		var w, h

		w = (screen.width / 2) - 150
		h = (screen.height / 2) - 125
	
		window.open("thankyou.htm","thankyou","resizable=yes,toolbar=no,menubar=no,directories=no,width=300,height=175,top="+h+",left="+w)
		}
		
	function WindowCheckoutLicense(f)
		{
		var h = screen.height - 100
		window.open(f,"license","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,directories=no,height="+h+",width=700,top=10,left=10")
		}		
	function WindowTerms()
		{
		var h = screen.height - 100
		window.open("terms.asp","terms","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,directories=no,height="+h+",width=700,top=10,left=10")
		}

	function WindowTerms2()
		{
		var h = screen.height - 100
		window.open("terms2.asp","terms2","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,directories=no,height="+h+",width=700,top=10,left=10")
		}
		
	function WindowTerms3()
		{
		var h = screen.height - 100
		window.open("terms3.asp","terms3","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,directories=no,height="+h+",width=700,top=10,left=10")
		}
	
	function WindowTerms4()
		{
		var h = screen.height - 100
		window.open("terms4.asp","terms4","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,directories=no,height="+h+",width=700,top=10,left=10")
		}
	
	function WindowTerms5()
		{
		var h = screen.height - 100
		window.open("terms5.asp","terms5","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,directories=no,height="+h+",width=700,top=10,left=10")
		}	
		
	function WindowTerms6()
		{
		var h = screen.height - 100
		window.open("terms6.asp","terms6","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,directories=no,height="+h+",width=700,top=10,left=10")
		}	
	
	function WindowPrivacy()
		{
		window.open("privacy.asp","privacy","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,directories=no,height=380,width=700,top=10,left=10")
		}		

	function WindowHelp()
		{
		var h = screen.height - 100
		window.open("help.asp","help","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,directories=no,height="+h+",width=700,top=10,left=10")
		}		
	