function menucontrol(){
document.write("<img src=\"http://www.propgo.com/resources/intero/images/qmenu.png\" border=0>");

	var url = document.URL;

	if(url.indexOf("aboutus")>0)
	{
		document.getElementById("m2").className ="menuhover";
		document.getElementById("a2").style.color ="#ffffff";
	}
	else if(url.indexOf("ourservices")>0)
	{
		document.getElementById("m3").className ="menuhover";
		document.getElementById("a3").style.color ="#ffffff";
	}
	else if(url.indexOf("interoexperience")>0)
	{
		document.getElementById("m4").className ="menuhover";
		document.getElementById("a4").style.color ="#ffffff";
	}
	else if(url.indexOf("interofoundation")>0)
	{
		document.getElementById("m5").className ="menuhover";
		document.getElementById("a5").style.color ="#ffffff";
	}
	else if(url.indexOf("mediasection")>0)
	{
		document.getElementById("m6").className ="menuhover";
		document.getElementById("a6").style.color ="#ffffff";
	}
	else if(url.indexOf("links")>0)
	{
		document.getElementById("m7").className ="menuhover";
		document.getElementById("a7").style.color ="#ffffff";
	}
	else if(url.indexOf("contactus")>0)
	{
		document.getElementById("m8").className ="menuhover";
		document.getElementById("a8").style.color ="#ffffff";
	}
	else
	{
		document.getElementById("m1").className ="menuhover";
		document.getElementById("a1").style.color ="#ffffff";
	}
}

function loadXMLDoc(dname) 
{
	try //Internet Explorer
	{
		xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
	}
	catch(e)
	{
		try //Firefox, Mozilla, Opera, etc.
		{
			xmlDoc=document.implementation.createDocument("","",null);
		}
		catch(e) {alert(e.message)}
	}
	try 
	{
		xmlDoc.async=false;
		xmlDoc.load(dname);
		return(xmlDoc);
	}
	catch(e) {alert(e.message)}
	return(null);
}

function ismaxlength(obj){
    var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : "";
    if (obj.getAttribute && obj.value.length>mlength)
    obj.value=obj.value.substring(0,mlength);
}

function NumCtl(i)
{   
    document.Num_return = true;
    if(!((i>=48&&i<=57)||(i>=96&&i<=105)||(i==8)||(i==9)||(i==46)||(i==37)||(i==38)||(i==39)||(i==40)))
        document.Num_return = false;
}


function MessageCBG(id, mess)
{
	document.getElementById(id).style.backgroundColor = '#ffffff';   
    if ( document.getElementById(id).value == "")
    {
        document.getElementById(id).style.backgroundColor = '#ff3333';
		alert(mess);
       return false;
    }
    else
       return true;
}

function MessageECBG(id, mess)
{   
	document.getElementById(id).style.backgroundColor = '#ffffff';
	var val = document.getElementById(id).value;
    var rx = new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$");

    if(!rx.test(val))
    {
        document.getElementById(id).style.backgroundColor = '#ff3333';
		alert(mess);
        return false;
    }
    else
        return true;
}

function MessageCBG_Select(id,mess)
{
    document.getElementById(id).style.backgroundColor = '#ffffd9';
    var val = document.getElementById(id).selectedIndex;
    if(val==0)
    {
        document.getElementById(id).style.backgroundColor = '#ff3333';
        alert(mess);
        return false;
    }
    
    return true;
}

function getC(id){
 var text;
 text = document.getElementById(id).value;
 text = text.replace(/&/g,'amp');
 text = text.replace("<", "lt");
 text = text.replace(">", "gt");
 text = text.replace("\"", "quot");
 text = text.replace(/ /g, "_");
 return text;
}

function clear(id){
	document.getElementById(id).value="";
}

function settext(id, text){
	document.getElementById(id).value=text;
}

function getV(id){
 return document.getElementById(id).value;
}

function hide(id){
 document.getElementById(id).style.display='none';
}

function show(id){
 document.getElementById(id).style.display='block';
}

function ischeck(id){
	if(document.getElementById(id).checked)
		return true;
	else
		return false;
}

function ischeck2(id){
	if(document.getElementById(id).checked)
		return 1;
	else
		return 0;
}

