//*********************** ES COPYRIGHT START  *********************************
// @copyright(disclaimer) 
// Licensed Materials - Property of IBM
// IBM OmniFind Enterprise Edition V8.4 (Program Number:  5724-C74)
// (c ) Copyright IBM Corp. 2003, 2006.  All Rights Reserved.
// 
// US Government Users Restricted Rights                                  
// Use, duplication or disclosure restricted by GSA ADP Schedule          
// Contract with IBM Corp.     
// 
// DISCLAIMER OF WARRANTIES :                                             
//                                                                        
// Permission is granted to copy and modify this  Sample code, and to           
// distribute modified versions provided that both the copyright        
// notice,- and this permission notice and warranty disclaimer  appear in all copies and modified  
// versions. 
// 
// THIS SAMPLE CODE IS LICENSED TO YOU AS-IS. 
// IBM  AND ITS SUPPLIERS AND LICENSORS  DISCLAIM     
// ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, IN SUCH SAMPLE CODE, INCLUDING THE WARRANTY OF NON-INFRINGEMENT AND THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL IBM OR ITS LICENSORS OR SUPPLIERS BE LIABLE FOR ANY DAMAGES ARISING OUT OF THE USE OF  OR INABILITY TO USE THE SAMPLE CODE, DISTRIBUTION OF THE SAMPLE CODE, OR COMBINATION OF THE SAMPLE CODE WITH ANY OTHER CODE. IN NO EVENT SHALL IBM OR ITS LICENSORS AND SUPPLIERS BE LIABLE FOR ANY LOST REVENUE, LOST PROFITS OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,-, EVEN IF IBM OR ITS LICENSORS OR SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.                                     
//                                                                  
// @endCopyright       
//*********************** ES COPYRIGHT END  ***********************************
 
    function hideShowDetailsFields(hideShow) {
       if (hideShow == "show") {
          for (var i = 0 ; ; i++) {
          	var f = document.getElementById("fields"+i);
          	if (f == null) {
          	   break;
          	} else {
          	   f.style.display = "block";
          	}   
          }	
       } else {
          for (var i = 0 ; ; i++) {
          	var f = document.getElementById("fields"+i);
          	if (f == null) {
          	   break;
          	} else {
          	   f.style.display = "none";
          	}   
          }	
       }
    }
	function toggleHideShowDetails() {
	    var prefix = "hideShowDetails";
		var link1El = document.getElementById(prefix+"Link1");
		var link2El = document.getElementById(prefix+"Link2");
		if (link1El.firstChild.nodeValue == SHOW_TEXT) {
    	    link1El.firstChild.nodeValue = HIDE_TEXT;
        	link1El.title = HIDE_TEXT_ALT;
	        link2El.firstChild.nodeValue = HIDE_TEXT;
    	    link2El.title = HIDE_TEXT_ALT;
            hideShowDetailsFields("show");
			SetCookie(prefix, "true");
		} else {
    	    link1El.firstChild.nodeValue = SHOW_TEXT;
        	link1El.title = SHOW_TEXT_ALT;
	        link2El.firstChild.nodeValue = SHOW_TEXT;
        	link2El.title = SHOW_TEXT_ALT;
            hideShowDetailsFields("hide");
			SetCookie(prefix, "false");
		}	
		return false;
	}
	function onloadHideShowDetails() {
	    var prefix = "hideShowDetails";
		var link1El = document.getElementById(prefix+"Link1");
		if (link1El) {
			var link2El = document.getElementById(prefix+"Link2");
			var cookie = GetCookie(prefix);
        	if (cookie != null && cookie == "true") {
				if (link1El) {
	    	       link1El.firstChild.nodeValue = HIDE_TEXT;
    	    	   link1El.title = HIDE_TEXT_ALT;
        		}   
				if (link2El) {
		           link2El.firstChild.nodeValue = HIDE_TEXT;
    		       link2El.title = HIDE_TEXT_ALT;
        		}   
       	    	hideShowDetailsFields("show");
		    } else {
				if (link1El) {
    		       link1El.firstChild.nodeValue = SHOW_TEXT;
        		   link1El.title = SHOW_TEXT_ALT;
	        	}   
				if (link2El) {
	    	       link2El.firstChild.nodeValue = SHOW_TEXT;
    	    	   link2El.title = SHOW_TEXT_ALT;
	        	}   
    	   	    hideShowDetailsFields("hide");
        	}
        }
	}
	function initPage() {
	   onloadHideShowDetails();
	   verifyBackgroundImagePadding();        
	}

