function showsubmain(x){
	document.getElementById('submain'+x).style.display='block';
	document.getElementById('mainlicap'+x).style.color='#C30000';		
}
function hidsubmain(x){
	document.getElementById('submain'+x).style.display='none';
	document.getElementById('mainlicap'+x).style.color='#C0C0C0';
}

function changestyle(x){
	//alert(x);
	if(x == 1){
		document.getElementById('contactus').style.color='#C30000';
	}
	if(x == 0){
		//document.getElementById('contactus').style.color='#C30000';
		document.getElementById('contactus').style.color='#C0C0C0';				
	}				
}

function showsubmenu(x){
	document.getElementById('submenu'+x).style.display='block';
	document.getElementById('sublink'+x).style.borderBottom= "2px solid #B32C0C";
	document.getElementById('sublink'+x).style.color="#B32C0C";
	document.getElementById('sublink'+x).style.fontWeight = "Bold";
	document.getElementById('sublink'+x).style.fontSize = "14px";
}
function hidsubmenu(x){
	document.getElementById('submenu'+x).style.display='none';
	document.getElementById('sublink'+x).style.borderBottom= "0px solid #C0C0C0";
	document.getElementById('sublink'+x).style.color="#C0C0C0";	
	document.getElementById('sublink'+x).style.fontWeight = "normal";
	document.getElementById('sublink'+x).style.fontSize = "12px";
}	
function showsublinker(x){
	document.getElementById('sublink'+x).style.borderBottom= "2px solid #B32C0C";
	document.getElementById('sublink'+x).style.color="#B32C0C";
	document.getElementById('sublink'+x).style.fontWeight = "Bold";
	document.getElementById('sublink'+x).style.fontSize = "14px";
}
function hidsublinker(x){
	document.getElementById('sublink'+x).style.borderBottom= "0px solid #C0C0C0";
	document.getElementById('sublink'+x).style.color="#C0C0C0";
	document.getElementById('sublink'+x).style.fontWeight = "normal";
	document.getElementById('sublink'+x).style.fontSize = "12px";
}

function validate(frm){
	//alert(frm.contact_name.value);
	var fname = frm.contact_name.value;
	if(fname =="" || fname == null ){
        frm.contact_name.setAttribute('class','highlight');
        frm.contact_name.setAttribute('className','highlight');
        alert("Please enter contact name");
        frm.contact_name.focus();
        return false;        
    }
    
    var illegalChars = /\W/;
    // allow only letters, numbers, and underscores
    if (illegalChars.test(fname)) {
        name.setAttribute('class','highlight');
        name.setAttribute('className','highlight');         
           alert("The name contains illegal characters<br>only letters, numbers, and underscores allowed");
        name.focus();       
           return false;
    }
    
	return true;
}


