var advancedSearchVisible = false

function layout()
	{
	if (advancedSearchVisible)
		{
		document.getElementById('advancedSearch').style.display = "none"
		toggleOnOff('on')				
		}
	else
		{
		document.getElementById('advancedSearch').style.display = "block"
		toggleOnOff('off')
		}
	}

function toggleadvancedSearch()
	{	
	advancedSearchVisible = advancedSearchVisible ? false : true
	}
		
function toggleOnOff(OnOrOff)
	{
	if (OnOrOff == 'on')
		document.images["linkTurnOnOffImage"].src = "images/arrow_right.gif"
	else
		document.images["linkTurnOnOffImage"].src = "images/arrow_down.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
		}
	}

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=yes, scrollbars=yes, status=yes')
	window.name = 'opener'
	}

function MM_openBrWindow(theURL,winName,features) 
	{
	window.open(theURL,winName,features)
	}

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 WindowPrivacy()
	{
	var h = screen.height - 100
	window.open("privacy.asp","privacy","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,directories=no,height="+h+",width=540,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=540,top=10,left=10")
	}

function WindowCopyright()
	{
	var h = screen.height - 100
	window.open("copyright.asp","copyright","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,directories=no,height="+h+",width=540,top=10,left=10")
	}

function WindowSignOut()
	{
	var w, h

	w = (screen.width / 2) - 230
	h = (screen.height / 2) - 115

	window.open("signout.asp","signout","resizable=yes,toolbar=no,menubar=no,directories=no,height=230,width=460,top="+h+",left="+w)
	}
