function checkCat()
{
    if ( document.formContact.cat.value == "" )
	{
	    alert( "Please select a category." );
	    return false;
	}
	return true;
} 

function ChangeTD(val)
{
	if (val=='R1')
	{
			document.getElementById("R1").className = "border-nright1";
			document.getElementById("R11").className = "grey-diagfl";
			document.getElementById("RR").style.display = "none";
			document.getElementById("WR").style.display = "block";
			
			document.getElementById("R2").className = "border-nleft1";
			document.getElementById("R22").className = "wht-diagfl";
	}
	if (val=='R2')
	{
			document.getElementById("R1").className = "border-nleft";
			document.getElementById("R11").className = "wht-diag";
			document.getElementById("RR").style.display = "block";
			document.getElementById("WR").style.display = "none";
			
			document.getElementById("R2").className = "border-nright";
			document.getElementById("R22").className = "grey-diag";
	}
}

function Disable()
{
	document.getElementById("R").style.display = 'none';
}
function toggle(questionid)
{
	q = document.getElementById(questionid);
	if (q.style.display=='block')
	{
		q.style.display='none';
		return;
	}
	else
	{
		q.style.display='block';
		return;
	}
}
function tab(tabNo)
{

	var section1  = document.getElementById("section1");
	var section2  = document.getElementById("section2");
	var section3  = document.getElementById("section3");	
	var section4  = document.getElementById("section4");		
	
	var tab1  = document.getElementById("tab1");
	var tab2  = document.getElementById("tab2");	
	var tab3  = document.getElementById("tab3");
	var tab4  = document.getElementById("tab4");	
	
	if (tabNo=="tab1")
	{
		section1.style.display="block";
		if ( section2 != null ) section2.style.display="none";		
		if ( section3 != null ) section3.style.display="none";
		if ( section4 != null ) section4.style.display="none";		
		
		tab1.className = "activetab";
		if ( tab2 != null ) tab2.className = "disactivetab";
		if ( tab3 != null ) tab3.className = "disactivetab";
		if ( tab4 != null ) tab4.className = "disactivetab";
	}
	
	if (tabNo=="tab2")
	{
		section1.style.display="none";
		if ( section2 != null ) section2.style.display="block";		
		if ( section3 != null ) section3.style.display="none";
		if ( section4 != null ) section4.style.display="none";
		
		tab1.className = "disactivetab";
		if ( tab2 != null ) tab2.className = "activetab";
		if ( tab3 != null ) tab3.className = "disactivetab";
		if ( tab4 != null ) tab4.className = "disactivetab";
	}	
	
	if (tabNo=="tab3")
	{
		section1.style.display="none";
		if ( section2 != null ) section2.style.display="none";		
		if ( section3 != null ) section3.style.display="block";		
		if ( section4 != null ) section4.style.display="none";	
		
		tab1.className = "disactivetab";
		if ( tab2 != null ) tab2.className = "disactivetab";
		if ( tab3 != null ) tab3.className = "activetab";
		if ( tab4 != null ) tab4.className = "disactivetab";
	}
	
	if (tabNo=="tab4")
	{
		section1.style.display="none";
		if ( section2 != null ) section2.style.display="none";	
		if ( section3 != null ) section3.style.display="none";
		if ( section4 != null ) section4.style.display="block";
		
		tab1.className = "disactivetab";
		if ( tab2 != null ) tab2.className = "disactivetab";
		if ( tab3 != null ) tab3.className = "disactivetab";
		if ( tab4 != null ) tab4.className = "activetab";
	}
	
}
function addBookmark(title,url)
{
	if (window.sidebar)
	{
		window.sidebar.addPanel(title, url,"");
	}
	else if( document.all )
	{
		window.external.AddFavorite( url, title);
	}
	else if( window.opera && window.print )
	{
		return true;
	}
}