//Current 3/8/2004
//=======================================================================
//Created by Michael Alperovich
//The function displays/hides a field based on the parameters passed
//fieldName is a TAG ID
//blnstate is 0/1  (hide/show)
function toggle(blnState, fieldName)
{
	//get an array of fields with the fieldName that is given
	var objFields = document.getElementsByName(fieldName);
    //alert("Hello " + fieldName);

	//loop through the field and show or hide them
  	for(i=0;i<objFields.length;i++)
  	{
   		if (blnState == 0)
   		{
    			// hide the field
    			objFields[i].style.display = 'none';
   		}
   		else
   		{
   			// show the field
    			objFields[i].style.display = '';
   		}
  	}

 }

//=======================================================================
//Created by Michael Alperovich
//The function switchs fields based on the parameters passed
//Doc1, Doc2 are TAG NAMEs
//show one or another information
 function Switch(show, doc1, doc2){
 	if (show==1){
 		toggle(1, doc1);
 		toggle(0, doc2);
	}

 }

//=======================================================================
//Created by Michael Alperovich
//The function redirects the URL
function DisplayPage(show, showURL){
 	if (show==1){
		top.location.replace(showURL);
	}
}

