	var panels = new Array('panel1', 'panel2', 'panel4');
	var selectedTab = null;
	var strComment = "";
	
	function getRandomPanel(range) 
	{ 
		if (Math.random) 
		{
			return Math.round(Math.random() * (range-1)); 
		}
		else 
		{ 
			var now = new Date(); 
			return (now.getTime() / 1000) % range; 
		} 
	}	
	
		function showdiv(anchorid)
    {
		//window.alert(anchorid);
		var anchorobj=document.getElementById(anchorid)
		var subobj=document.getElementById(anchorobj.getAttribute("rel"))
		
		//set to visible, slightly below/above the anchor object
		if (subobj.style.visibility=="hidden"){
		    subobj.style.visibility="visible";
		}
	}
	
	function closediv(anchorid)
    {
		//window.alert(anchorid);
		var anchorobj=document.getElementById(anchorid)
		var subobj=document.getElementById(anchorobj.getAttribute("rel"))
		
		//set to visible, slightly below/above the anchor object
		if (subobj.style.visibility=="visible"){
		    subobj.style.visibility="hidden";
		}		
	}	
	
	function closeall()
	{		
		var subobj=document.getElementById("aboutMenu")
		subobj.style.visibility="hidden";
		subobj=document.getElementById("servicesMenu")
		subobj.style.visibility="hidden";
		subobj=document.getElementById("solutionsMenu")
		subobj.style.visibility="hidden";
		subobj=document.getElementById("productsMenu")
		subobj.style.visibility="hidden";
		subobj=document.getElementById("supportMenu")
		subobj.style.visibility="hidden";
		subobj=document.getElementById("downloadMenu")
		subobj.style.visibility="hidden";
	}
	
	function setMarquee()
	{
		strSpacer = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';		
		strText = '<b>November 6, 2007</b> - Bridging the Disparate Islands in Real Estate Webinar 11.00 am CT' + strSpacer;
		strText += '<b>November 8-10, 2007</b> - <a href=events.htm>SIOR Fall Professional Conference (St. Louis, MO)</a>' + strSpacer;
		strText += '<b>November 13 , 2007</b> - Webinar 11.00 am CT' + strSpacer;
		strText += '<b>November 28-29, 2007</b> - <a href=events.htm>IMN West Coast Symposium (Scottsdale, AZ)</a>' + strSpacer;
		strText += '<b>December 4, 2007</b> - Webinar 11.00 am CT' + strSpacer;
		document.all.acxmarquee.innerHTML = strText;
	}
	
	function showRandomPanel()
	{
		var nChoice = getRandomPanel(8);
		//alert(nChoice);
		switch(nChoice)
		{
			case 1:
				showPanel(document.getElementById('tab1'), 'panel1')
				break
			case 2:
				showPanel(document.getElementById('tab4'), 'panel4')
				break
			case 3:
				showPanel(document.getElementById('tab1'), 'panel1')
				break
			case 4:
				showPanel(document.getElementById('tab4'), 'panel4')
				break
			case 5:
				showPanel(document.getElementById('tab1'), 'panel1')
				break
			case 6:
				showPanel(document.getElementById('tab4'), 'panel4');
				break
			case 7:
				showPanel(document.getElementById('tab4'), 'panel4');
				break
			case 8:
				showPanel(document.getElementById('tab4'), 'panel4');
				break
			default:
				showPanel(document.getElementById('tab1'), 'panel1')
				break
		}
	} 
	
	var panelsThree = new Array('panel1', 'panel2', 'panel3');
	selectedTab = null;
	
	function showPanel(tab, name)
	{	
		if (selectedTab) 
		{
		  selectedTab.style.backgroundColor = '';
		  selectedTab.style.paddingTop = '';
		  selectedTab.style.paddingBottom = '';
		}
		  selectedTab = tab;
		  selectedTab.style.backgroundColor = 'white';
		  if (name == 'panel1')
		  {
		  	document.getElementById('colortab').style.backgroundColor = '#66CC00';
		  }
		  else if (name == 'panel2')
		  {
		  	document.getElementById('colortab').style.backgroundColor = '#00CC99';
		  }
		  else
		  {
		  	document.getElementById('colortab').style.backgroundColor = 'orange';	
		  }
		  selectedTab.style.paddingTop = '6px';
		  for(i = 0; i < panels.length; i++)
			{
			  document.getElementById(panels[i]).style.display = (name == panels[i]) ? 'block':'none';
			}
		  return false;
	}		
	
	
	function verify() 
	{  	
		document.mainform.allowsubmit.value = "Yes";
		if (document.mainform.contact.value == "") 
			{	
				document.mainform.allowsubmit.value = "No";			
			}			
		if (document.mainform.accname.value == "") 
			{	
				document.mainform.allowsubmit.value = "No";						
			}
	
		if (document.mainform.cphwork.value == "") 
			{	
				document.mainform.allowsubmit.value = "No";						
			}
		if (document.mainform.allowsubmit.value == "Yes") 
			{	
				document.mainform.submit();
			}
		else
			{
				window.alert("Incomplete Form - Please complete bolded fields");
			}								
	}
	
	function verifySupport() 
	{  		
		document.mainform.allowsubmit.value = "Yes";
		if (document.mainform.contact.value == "") 
			{	
				document.mainform.allowsubmit.value = "No";			
			}			
		if (document.mainform.conmail.value == "") 
			{	
				document.mainform.allowsubmit.value = "No";						
			}
		if (document.mainform.allowsubmit.value == "Yes") 
			{	
				document.mainform.submit();
			}
		else
			{
				window.alert("Incomplete Form - Please complete bolded fields");
			}								
	}
	
	function showPanelThree(tab, name)
	{
		if (selectedTab) 
		{
		  selectedTab.style.backgroundColor = '';
		  selectedTab.style.paddingTop = '';
		  selectedTab.style.paddingBottom = '';
		}
		  selectedTab = tab;
		  selectedTab.style.backgroundColor = 'white';
		  selectedTab.style.paddingTop = '6px';
		  for(i = 0; i < panels.length; i++)
			{
			  document.getElementById(panels[i]).style.display = (name == panels[i]) ? 'block':'none';
			}
		  return false;
		}	
		  
	function setLabel()
	{
		document.all.yearLabel.innerHTML =  '&nbsp;<span style="font-family: calibri,tahoma;font-style: normal;font-variant: normal;	font-weight: normal;font-size: 12px;">2010 Ascendix Technologies, Inc. All Rights Reserved. Sage Software, the Sage Software logos, and the Sage Software product and service names mentioned herein are registered trademarks or trademarks of Sage Software, Inc., or its affiliated entities. All other trademarks are property of their respective owners.</span>';
	}
	
	function setAnnouncement()
	{
		document.all.annLabel.innerHTML =  '<a href=mainNews.htm>Ascendix named Top 5 SalesLogix Business Partner For 3rd Year in a Row...</a>';
	}
	
	var strCustomer0 = '"' + 'Customer Comments here...We think Ascendix is just great! This will be auto changing' + '"' + '<br><br><b>Customer Name</b><br><a href=http://www.saleslogix.com target=_blank>Customer Company</a>';
	var strCustomer1 = '"' + 'Customer Comments here...Hey Todd What' + "'" + 's up!' + '"' + '<br><br><b>Customer Name</b><br><a href=http://www.saleslogix.com target=_blank>Customer Company</a>';
	var strCustomer2 = '"' + 'Customer Comments here...Yasa Rules! This will be auto changing' + '"' + '<br><br><b>Customer Name</b><br><a href=http://www.saleslogix.com target=_blank>Customer Company</a>';
	var strCustomer3 = '"' + 'Customer Comments here...Hey Patrick you suck! This will be auto changing' + '"' + '<br><br><b>Customer Name</b><br><a href=http://www.saleslogix.com target=_blank>Customer Company</a>';
	var strCustomer4 = '"' + 'Customer Comments here...Ascendix 2006 rules! This will be auto changing' + '"' + '<br><br><b>Customer Name</b><br><a href=http://www.saleslogix.com target=_blank>Customer Company</a>';
	var strCustomer5 = '"' + 'Customer Comments here...We think Ascendix is just SWELL! This will be auto changing' + '"' + '<br><br><b>Customer Name</b><br><a href=http://www.saleslogix.com target=_blank>Customer Company</a>';
	
	function setComment()
	{
		var i = 6; 
		var myArray = new Array(i);
		myArray[0] = strCustomer0; 
		myArray[1] = strCustomer1; 
		myArray[2] = strCustomer2; 
		myArray[3] = strCustomer3; 
		myArray[4] = strCustomer4; 
		myArray[5] = strCustomer5; 
		
		var nChoice = getRandom(i);
		document.all.custcomments.innerHTML =  myArray[nChoice];
	}
	
	function getRandom(range) 
	{ 
		if (Math.random) 
		{
			return Math.round(Math.random() * (range-1)); 
		}
		else 
		{ 
			var now = new Date(); 
			return (now.getTime() / 1000) % range; 
		} 
	} 
	
	// 12/25/2001 -- Jason Hollon
    function setCookie (name, value, expires)
    {
        if (!expires) expires = new Date();
		document.cookie = name + "=" + escape (value) + "; expires=" +
		expires.toGMTString() +  "; path=/";
    }

    function getCookie (name)
	{
    	var dcookie = document.cookie;
    	var cname = name + "=";
    	var clen = dcookie.length;
    	var cbegin = 0;
        while (cbegin < clen) 
		{
        	var vbegin = cbegin + cname.length;
            if (dcookie.substring(cbegin, vbegin) == cname) 
			{
            	var vend = dcookie.indexOf (";", vbegin);
                if (vend == -1) vend = clen;
            	return unescape(dcookie.substring(vbegin, vend));
            }
        	cbegin = dcookie.indexOf(" ", cbegin) + 1;
            if (cbegin == 0) break;
        }
    	return null;
    }

 	function beenHere()
 	{
        var expdate = new Date ();
        expdate.setTime (expdate.getTime() + (1000 * 60 * 15));
        setCookie ('beenHere', -1, expdate);
 	}
	
	function DoComplete() 
	{
	    verify();
	}
	
	function DoComplete2() 
	{
	    verifySupport();
	}