function testFunc() {
	alert('text hello');
	}
// popupWindow function
// This is where you set your specific height & width etc... for your popups.
function openPopup(url,popType) {
	if (popType==1)
		window.open(url, 'popupwindow', 'width=556,height=600,scrollbars,resizable'); 
	else
		window.open(url);
	return false;
	}

function setFocus(formName, field) {
	eval('document.'+formName+'.'+field+'.focus()');
	}

$(document).load(function(){

	$("form#fil").hide()
	$("form#dir").hide()

	fileCntVar = 1;
	dirCntVar = 1;
	
	$("a#switch-fil").click(function(){
		/* if button is clicked when "up" */
		if (fileCntVar == 1){
			/* button toggle value */
			fileCntVar = 0;
			$("form#dir").hide();
			$("form#fil").show();
			
 			$(this).addClass("on");
			$("a#switch-dir").removeClass("on");
			//setFocus('fil','upl-file');
		
		/* if button is clicked when "down" */
		} else if (fileCntVar == 0) {
			fileCntVar = 1;
			$("form#dir").hide();
			$("form#fil").hide();
			
 			$(this).removeClass("on");
			//$("a#switch-dir").removeClass("on");
		}
		/*reset the other button to "up" state*/
		dirCntVar = 1;
		
		return false;
	});
	
	$("a#switch-dir").click(function(){
	
		/* if button is clicked when "up" */
		if (dirCntVar == 1){
		
			/* button toggle value */
			dirCntVar = 0;
			$("form#dir").show();
			$("form#fil").hide();
			
 			$(this).addClass("on");
			$("a#switch-fil").removeClass("on");
			setFocus('dirform','txtname');
			
		/* if button is clicked when "down" */
		} else if (dirCntVar == 0){
			dirCntVar = 1;
			$("form#dir").hide();
			$("form#fil").hide();
			
 			$(this).removeClass("on");
			//$("a#switch-fil").removeClass("on");
		}
		/*reset the other button to "up" state*/
		fileCntVar = 1;
		
		//$("#txt-name").focus();
		return false;
	});	
		
	
	/*$("form#fil").hide();
	$("form#dir").hide();

	$("a#switch-fil").click(function(){
		$("form#dir").hide();
		$("form#fil").toggle();
		
		return false;
		});

	$("a#switch-dir").click(function(){
		$("form#fil").hide();
		$("form#dir").toggle();
		
		return false;
		});*/
	
	// Popups and external links.
	$("a.popup").click(function(){
		var url = this.href;
		openPopup(url,1);
		return false;
		})
	
	$("a.external").click(function(){
		var url = this.href;
		openPopup(url,2);
		return false;
		})
	
	var company_type = $("input[@name='User_Reg_Type']:checked").val();

if (company_type == 1)
{
$("#indiv_questions").hide();
$("#company_questions").show();	
}
else if(company_type == 2)
{
$("#indiv_questions").show();
$("#company_questions").hide(); 
}
else
{
	$("#indiv_questions").hide();
	$("#company_questions").hide();
}

/* $("input[@name='User_Reg_Type']:checked").val() == 1 ? ($(".indiv_questions").hide(),$(".company_questions").show()): ($(".indiv_questions").show(),$(".company_questions").hide()); */


$("#rad-User_Reg_Type-1").click(function() {

$('#company_questions').show();
$('#indiv_questions').hide();
});
$("#rad-User_Reg_Type-2").click(function() {

$('#company_questions').hide();
$('#indiv_questions').show();

});
	

	// Turn off the layers to begin with.
	$("div.hom").toggle();
	$("div.abo").toggle();
	$("div.cli").toggle();
	$("div.wor").toggle();
	$("div.hed").toggle();
	$("div.tea").toggle();
	$("div.con").toggle();
	$("div.log").toggle();
	
	// Home
		$("li.hom a").mouseover(function(){
			$("div.hom").toggle()
			});
		
		$("li.hom a").mouseout(function(){
			$("div.hom").toggle()
			});
	
	// About Us
		$("li.abo a").mouseover(function(){
			$("div.abo").toggle()
			});
		
		$("li.abo a").mouseout(function(){
			$("div.abo").toggle() 
			});
	
	// Our Clients
		$("li.cli a").mouseover(function(){
			$("div.cli").toggle()
			});
		
		$("li.cli a").mouseout(function(){
			$("div.cli").toggle()
			});
	
	// Our Work
		$("li.wor a").mouseover(function(){
			$("div.wor").toggle()
			});
		
		$("li.wor a").mouseout(function(){
			$("div.wor").toggle()
			});
	
	// HedgeBrand
		$("li.hed a").mouseover(function(){
			$("div.hed").toggle()
			});
		
		$("li.hed a").mouseout(function(){
			$("div.hed").toggle()
			});
	
	// Team
		$("li.tea a").mouseover(function(){
			$("div.tea").toggle()
			});
		
		$("li.tea a").mouseout(function(){
			$("div.tea").toggle()
			});
	
	// Contact Us
		$("li.con a").mouseover(function(){
			$("div.con").toggle()
			});
		
		$("li.con a").mouseout(function(){
			$("div.con").toggle()
			});
	
	// Client Login
		$("li.log a").mouseover(function(){
			$("div.log").toggle()
			});
		
		$("li.log a").mouseout(function(){
			$("div.log").toggle()
			});
	});
