pendingClear = "false";
clearTimer = "";

if(document.images){
	ServicesOn= new Image();
	ServicesOn.src="http://www.srcpt.com/images/services-sub-on.jpg";  
	ServicesOff= new Image();
	ServicesOff.src="http://www.srcpt.com/images/services-sub-off.jpg";
	
	ProductsOn= new Image();
	ProductsOn.src="http://www.srcpt.com/images/products-sub-on.jpg";  
	ProductsOff= new Image();
	ProductsOff.src="http://www.srcpt.com/images/products-sub-off.jpg";
	
	PressOn= new Image();
	PressOn.src="http://www.srcpt.com/images/press-sub-on.jpg";  
	PressOff= new Image();
	PressOff.src="http://www.srcpt.com/images/press-sub-off.jpg";
	
	ResourcesOn= new Image();
	ResourcesOn.src="http://www.srcpt.com/images/resources-sub-on.jpg";  
	ResourcesOff= new Image();
	ResourcesOff.src="http://www.srcpt.com/images/resources-sub-off.jpg";
	
	ContactOn= new Image();
	ContactOn.src="http://www.srcpt.com/images/contact-sub-on.jpg";  
	ContactOff= new Image();
	ContactOff.src="http://www.srcpt.com/images/contact-sub-off.jpg";

	HomeServicesOn= new Image();
	HomeServicesOn.src="http://www.srcpt.com/images/services-home-on.jpg";  
	HomeServicesOff= new Image();
	HomeServicesOff.src="http://www.srcpt.com/images/services-home-off.jpg";
	
	HomeProductsOn= new Image();
	HomeProductsOn.src="http://www.srcpt.com/images/products-home-on.jpg";  
	HomeProductsOff= new Image();
	HomeProductsOff.src="http://www.srcpt.com/images/products-home-off.jpg";
	
	HomePressOn= new Image();
	HomePressOn.src="http://www.srcpt.com/images/press-home-on.jpg";  
	HomePressOff= new Image();
	HomePressOff.src="http://www.srcpt.com/images/press-home-off.jpg";
	
	HomeResourcesOn= new Image();
	HomeResourcesOn.src="http://www.srcpt.com/images/resources-home-on.jpg";  
	HomeResourcesOff= new Image();
	HomeResourcesOff.src="http://www.srcpt.com/images/resources-home-off.jpg";
	
	HomeContactOn= new Image();
	HomeContactOn.src="http://www.srcpt.com/images/contact-home-on.jpg";  
	HomeContactOff= new Image();
	HomeContactOff.src="http://www.srcpt.com/images/contact-home-off.jpg";

}
		

function killMenu(menu) { 
	clearTimer = setTimeout("clearMenu('" + menu + "')",3000);
}


function showMenu(menu){
	if (document.getElementById){
		document.getElementById('ServicesMenu').style.visibility = "hidden";
		document.getElementById('ProductsMenu').style.visibility = "hidden";
		document.getElementById('PressMenu').style.visibility = "hidden";
		document.getElementById('ResourcesMenu').style.visibility = "hidden";
		document.getElementById('ContactMenu').style.visibility = "hidden";
		document.getElementById(menu).style.visibility = 'visible';
		clearTimeout(clearTimer);
	} else {
		document.all.ServicesMenu.style.visibility = "hidden";
		document.all.ProductsMenu.style.visibility = "hidden";
		document.all.PressMenu.style.visibility = "hidden";
		document.all.ResourcesMenu.style.visibility = "hidden";
		document.all.ContactMenu.style.visibility = "hidden";
		eval('document.all.' + menu).style.visibility = 'visible';
		clearTimeout(clearTimer);
	}
}

function clearMenu(menu){
	// turn off the last selected menu
	if(menu != 'HomeMenu'){
		if (document.getElementById){
			document.getElementById(menu).style.visibility = 'hidden';
		}else{
			eval('document.all.' + menu).style.visibility = 'hidden';
		}
	}
	if (document.getElementById){
//		document.getElementById('HomeMenu').style.visibility = 'visible';
	}else{
		document.all.HomeMenu.style.visibility = 'visible';
	}
}


function waxOn(imgName,mode){
	if(document.images){
		if(document.all){
			document.all[imgName].src = eval(imgName+mode+'.src');
		}else{
			document[imgName].src = eval(imgName+mode+'.src');
		}

	}	
}

function showMsg(msg){
	document.getElementById('msgDiv').innerHTML = msg;
}

/******
* Workshed Media (c) 2007
* 
* Interactive script / uses JQuery lib
*****/

searchCust = function(view){
	
	
	if($('#f_name').val() ) {
		if( view != "all"){
	  	 	var f_name = $('#f_name').val();
		}else{
			var f_name = "";
		}
	} else {
		 var f_name = '';
	}
	if($('#l_name').val() ) {
		if( view != "all"){
	   		var l_name = $('#l_name').val();
		} else {
			var l_name = "";
		}
	} else {
		var l_name = '';
	}
	
    var post = 'f_name='+f_name+'&l_name='+l_name+'&searchstr=do';
    
    $.ajax({ 
		  type: "POST", 
		  url: "ajax_processor.php", 
		  data: post, 
		  dataType: "text/html", 
		  success: function(msg){ 
		// alert(msg);
		    $('#results').show('slow',function(){ 
		    	$('#data_set_here').html(msg);
		    	});
		  } 
		});
}//end

sportOther = function(){
	if($('#sport').val() == 'other'){ 
		$('#hiddenSport').show();
	}else {
		if($('#hiddenSport').css('display') == 'block' ){
			
			$('#hiddenSport').hide('fast',function(){
				$('#newSport').val('');
			});
			
		}//end if
	}//end if

}//end function