var imgplus = new Image(9,9);
var imgminus = new Image(9,9);
imgplus.src="/vximages/plus_9g.gif";
imgminus.src="/vximages/min_9g.gif";

function dvt()
{
var i=1;
}
// Expand all jexpand divs
function showAll()
{
if (!document.anchors) return;

   var id;
   var allitems = document.anchors;

   id="expandopt";

   if (document.getElementById(id) != null)
   {
       document.getElementById(id).style.display = "block";
   }    

   for (var i = 0; i < allitems.length; i++)
   	  {
   	  	if (allitems[i].className == "jexpand")
   	  	{
   	  		id="dv" + allitems[i].name;


   	  		if  (document.getElementById((id)) != null) 
   	  		{
   	  			hsExpand(id);
			}
   	    }
   	   }
}


function initDocument()
{
	hideAll();
	
}

// Collapse all jexpand divs 
function hideAll()
{
if (!document.anchors) return;
   
   var id;
   var allitems = document.anchors;

   id="expandopt";

   if (document.getElementById(id) != null)
   {
       document.getElementById(id).style.display = "block";
   }    

   for (var i = 0; i < allitems.length; i++)
   	  {
   	  	if (allitems[i].className == "jexpand")
   	  	{
   	  		id="dv" + allitems[i].name;

   	  		if  (document.getElementById((id)) != null)
   	  			hsCollapse(id);

   	    }
   	   }
}

// Helper-Expand all jexpand divs 
function hsexpAll(pid) 
{ 
	var id="dv"+pid;
	
	if  (document.getElementById(id) != null)
	{
		if (document.getElementById(id).style.display == "none")
		{
			hsExpand(id);
			showAll();

		}
		else 
		{
			hsCollapse(id);
			hideAll();				
			}
	}
}

// Helper-Expand Div ID
function hsexp(pid) 
{ 
	var id="dv"+pid;
	
	if  (document.getElementById(id) != null)
	{
		if (document.getElementById(id).style.display == "none")
		
			{		    
			hsExpand(id);
			}
		else 
			hsCollapse(id);				
	}
}

// Helper-Collapse Div ID - Set Visuals
function hsCollapse(id)
{
			document.getElementById(id).style.display = "none";	
			cesimg(("img"+id),"imgplus");	
}

// Helper-Expand Div ID - Set Visuals
function hsExpand(id)
{
			document.getElementById(id).style.display = "block";
			cesimg(("img"+id),"imgminus");			
}

// this switches expand collapse icons
function cesimg(imagename,objectsrc){
	if (document.images){
		if (document.images[imagename] != null)
			document.images[imagename].src=eval(objectsrc+".src");
	}
}

function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
  alert("Created Cookie");
}

function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) 
		{
			return c.substring(nameEQ.length,c.length);
			alert("Found the cookie");
		}
	}
	return null;
}

function eraseCookie(name)
{
	createCookie(name,"",-1);
}