var openImg = new Image();
openImg.src = "../img/icons/open.gif";
var closedImg = new Image();
closedImg.src = "../img/icons/close.gif";

function showBranch(branch){
	var objBranch = document.getElementById(branch).style;
	if(objBranch.display=="block")
		objBranch.display="none";
	else
		objBranch.display="block";
	swapFolder('I' + branch);

}

function showBranch2(branch2){
	var objBranch2 = document.getElementById(branch2).style;
	if(objBranch2.display=="none")
		objBranch2.display="block";
	else
		objBranch2.display="none";
	swapFolder('I' + branch2);
}

function swapFolder(img){
	objImg = document.getElementById(img);
	if(objImg.src.indexOf('close.gif')>-1)
		objImg.src = openImg.src;
	else
		objImg.src = closedImg.src;
}

//click show for disclaimers
$(document).ready(function() {
	$('div.click-show:eq(0)> div').hide();
	$('div.click-show:eq(0)> h4').click(function() {
		$(this).next().slideToggle('fast');
	});
	$('.toggle-all').toggle(function() {
		$('div.click-show > div:hidden').slideDown('fast');
		$(this).text('Hide all details');
	}, function() {
		$('div.click-show > div:visible').slideUp('fast');
		$(this).text('Show all details');
	});
});

//click show for current customers
$(document).ready(function() {
	$('div.customers:eq(0)> div').hide();
	$('div.customers:eq(0)> h4').toggle(function() {
		$('div.customers > div:hidden').slideDown('fast');
		$(this).toggleClass('arrow');
	}, function() {
		$('div.customers > div:visible').slideUp('fast');
		$(this).toggleClass('arrow');
	});
	$('.toggle-cust').toggle(function() {
		$('div.customers > div:hidden').slideDown('fast');
		$(this).text('CLOSE');
	}, function() {
		$('div.customers > div:visible').slideUp('fast');
		$(this).text('CLOSE');
	});
	
});


//clear seach
 function doClear(theText) 
{
     if (theText.value == theText.defaultValue)
 {
         theText.value = ""
     }
 }
 
  //Blur
  function doblur(theText) 
{ //alert(theText.value);
     if (theText.value == "")
 {
 //alert(theText.defaultValue);
         theText.value = theText.defaultValue
     }
 }
