//<!--
// includes/scripts.js





function classChange(element,newclass)
        {
        element.className = newclass;
        }




function clickTrack(id,ip,js,cty,st,r,ur)
{
	var proto = location.protocol;
	var str = 'id='+id+'&ip='+ip+'&js='+js+'&r='+r+'&ur='+ur;
	http.open('POST',''+proto+'//www.area-info.net/adserv/adTrack2.php',true);
	http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	http.send(str);
}



function initFocus() 
{
	document.form.elements[0].focus();
}



function SubDisable(f) 
{
	if (document.getElementById)
	{
		for (var sch = 0; sch < f.length; sch++) 
		{
			if (f.elements[sch].type.toLowerCase() == "submit")
			{
				f.elements[sch].disabled = true;
			}
		}                  
	}                   
	return true;          
}            


function waitValidate(f)
{
	var ProcessingText = "Please wait...";
	f.submit.value=ProcessingText;
	//f.submit.disabled=true;
	SubDisable(f);
	f.submit();
}



function Invers()
{
        temp = document.form.elements.length;
        for (i=0; i < temp; i++)
        {
                if (document.form.elements[i].checked == 1)
                {
                        document.form.elements[i].checked = 0;
                }
                else
                {
                        document.form.elements[i].checked = 1;
                }
        }
}

function doCheckIT()
{
	temp = document.form.elements.length;
	for (i=0; i<temp; i++)
	{
		if (document.form.elements[i].checked == 1)
		{
			document.form.elements[i].checked = 1;
		}
		else
		{
			document.form.elements[i].checked = 1;
		}
	}
}


function doUnCheckIT()
{
        temp = document.form.elements.length;
        for (i=0; i<temp; i++)
        {
                if (document.form.elements[i].checked == 1)
                {
                        document.form.elements[i].checked = 0;
                }
                else
                {
                        document.form.elements[i].checked = 0;
                }
        }
}



function clearDefault(el) 
{
	if (el.defaultValue==el.value) el.value = ""
}



function showCities(str)
{
        if (str=="")
        {
                document.getElementById("txtCities").innerHTML="<select><option></option></select>";
                return;
        }
        if (window.XMLHttpRequest)
        {// code for IE7+, Firefox, Chrome, Opera, Safari
                xmlhttp=new XMLHttpRequest();
        }
        else
        {// code for IE6, IE5
                xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function()
        {
                if (xmlhttp.readyState==4 && xmlhttp.status==200)
                {
                        document.getElementById("txtCities").innerHTML=xmlhttp.responseText;
                }
        }
        xmlhttp.open("GET","/articles/getCities.ajax.php?q="+str,true);
        xmlhttp.send();
}

function showStates(str)
{
        if (str=="")
        {
                document.getElementById("txtStates").innerHTML="<select><option></option></select>";
                document.getElementById("txtCities").innerHTML="<select><option></option></select>";
                return;
        }
        if (window.XMLHttpRequest)
        {// code for IE7+, Firefox, Chrome, Opera, Safari
                xmlhttp=new XMLHttpRequest();
        }
        else
        {// code for IE6, IE5
                xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function()
        {
                if (xmlhttp.readyState==4 && xmlhttp.status==200)
                {
                        document.getElementById("txtStates").innerHTML=xmlhttp.responseText;
                }
        }
        xmlhttp.open("GET","/articles/getStates.ajax.php?q="+str,true);
        xmlhttp.send();
}


function getXHTTP()
{
        var xhttp;
        try
        {   // The following "try" blocks get the XMLHTTP object for various browsers.
                xhttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e)
        {
                try
                {
                        xhttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
                catch (e2)
                {
                        // This block handles Mozilla/Firefox browsers...
                        try
                        {
                                xhttp = new XMLHttpRequest();
                        }
                        catch (e3)
                        {
                                xhttp = false;
                        }
                }
        }
        return xhttp; // Return the XMLHTTP object
}

var http = getXHTTP(); // This executes when the page first loads.



// -->

