	function doProcessing() {
		document.getElementById('button').className = 'thide';
		document.getElementById('processing').className = 'tshow';
	}
        
    function formdoProcessing() {
		document.getElementById('form_button1').className = 'thide';
		document.getElementById('form_processing1').className = 'tshow';
	}
    function formdoProcessing1() {
        document.getElementById('form_button').className = 'thide';
		document.getElementById('form_processing').className = 'tshow';
    }

    /*for dynamically changing the width of page on formload*/   
    function calculateCssPropertiesfortab() {
        if(document.getElementById("formtab") != null){
            document.getElementById("formbodybg").style.height= document.getElementById("formtab").offsetHeight+25;
            document.getElementById("formbody").style.height= document.getElementById("formtab").offsetHeight+120;
            document.getElementById("container").style.height= document.getElementById("formtab").offsetHeight+293;
            document.getElementById("subcontainer").style.height= document.getElementById("formtab").offsetHeight+293;
            document.getElementById("formmid").style.height= document.getElementById("formtab").offsetHeight+120;
            document.getElementById("fooform").style.top= document.getElementById("formtab").offsetHeight+105;            
        }
      }


    /* used for opening the window */
	function openWin(page, name, details) {
		newWin = window.open(page, name, details);
		if (window.focus) { newWin.focus() }
	}

	function popupPreview(urltxt, wid, high){
	    wid+=0;
	    high+=0;
	    var flagvar=0;
	    try{
            confirmWin.close();
    		confirmWin=window.open(urltxt, "kwu","height=" +high+ ",width="+wid+",directories=no,location=no,menubar=no," +
			"resizable=yes,status=no,toolbar=no,scrollbars=yes");
		} catch(e){
		    confirmWin=window.open(urltxt, "kwu","height=" +high+ ",width="+wid+",directories=no,location=no,menubar=no," +
							 "resizable=yes,status=no,toolbar=no,scrollbars=yes");
	      }
	  if (window.confirmWin) {
	    if (window.focus){
	        if ((navigator.appName.indexOf("Microsoft Internet Explorer")!=-1)&&(navigator.appVersion.indexOf("4.") != -1)
			    &&(parent.length>0)) {
				    window.confirmWin.close();
					flagvar=1;
					timevar = setTimeout("openit(urltxt)", 300);      
			} else {
					confirmWin.focus();
			  }
        }else{
            if(navigator.appName.indexOf("Microsoft Internet Explorer") != -1) {  // If this is a MSIE Browser
                if(navigator.appVersion.indexOf("3.") != -1) {  // MSIE 3.x
                    if(isLoaded == true) {
                        alert("If the large image does not pop up, press the 'Product Close-up' tab in your task bar, or locate the image browser behind your open window." );
						return;
                    }else {
                        alert("If the Site Menu bar does not pop up, press the 'Product Close-up' tab in your task bar, or locate the image browser behind your open window." );
						return;
					 }
                }
            }
         }
	  }else {
	        confirmWin = window.open(urltxt, "kwu",
			"height=" +high+ ",width="+wid+",directories=no,location=no,menubar=no," +
			"resizeable=no,status=no,toolbar=no");
			var isLoaded = true;
	   }
	   // This is important for Netscape 2.0 to enable the opener property
	   if (flagvar!=1) {
		    if (confirmWin.opener == null) {
			    confirmWin.opener = self;
		    }
	   }
       wid=0;
       high=0;
	}

    //Sets country for onchange of state field
    function SPonChange() {
        document.form.CN.value = document.form.SP.value.substring(0,2);
    }
    
    
    
    function showLayer(layerToShow) {
    	var layerValue = layerToShow;
    	var idArray = layerArray();
    	for (var i = 0; i < idArray.length; i++) {
    		var idTmp = idArray[i];
    		if (layerValue == idTmp) {
    			document.getElementById(idTmp).style.display = "block";
    		} else {
    			document.getElementById(idTmp).style.display = "none";
    		}
    	}
    }
    

