function bookmark(url,title) {
	var Netscape, MSIE, Opera, Unknown;
	var Win, Mac, Other;
	var NetscapeVer, MSIEVer, OperaVer;
	
	Netscape = navigator.appName == "Netscape";
	MSIE = navigator.appName == "Microsoft Internet Explorer";
	Opera = navigator.userAgent.indexOf("Opera") > -1;
	Unknown = !(Netscape || MSIE || Opera);
	
	Win = navigator.userAgent.indexOf("Win") > -1;
	Mac = navigator.userAgent.indexOf("Mac") > -1;
	Other = !(Win || Mac);
	if(Netscape) {
		NetscapeVer = parseFloat(navigator.appVersion);
		}
	else if(MSIE) {
		n = navigator.userAgent;
		MSIEVer = n.substr(n.indexOf("MSIE ")+("MSIE ").length, 4);
		MSIEVer = parseFloat(MSIEVer); 

		if(Opera) {
			OperaVer = n.substr(n.indexOf("Opera ")+("Opera ").length, 4);
			OperaVer = parseFloat(OperaVer);
			}
		}
	if(Opera) {
	    alert("Press Ctrl+T to bookmark this site!");
	  	}
    else if(Win && MSIE && MSIEVer >= 5) {
		window.external.AddFavorite(url,title);
		}
	else {
		alert("Press Ctrl+D to bookmark this page!");
		}
	}
	
	
function DropdownSelected(mySel,ONET)
         {
             var Abbrev = new Array("AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","GU","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","PR","RI","SC","SD","TN","TX","VI","UT","VT","VA","WA","WV","WI","WY");
             var stfips = new Array("01","02","04","05","06","08","09","10","11","12","13","66","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","72","44","45","46","47","48","78","49","50","51","53","54","55","56");
             var x = Abbrev.length;
             var code;
             var i;
             for(y = 0; y < x; y++)
             {
                 if (mySel == Abbrev[y])
                 {
                   i=y;
                 }
             }
             code = stfips[i];
             document.form1.hidStateFips.value = code;
            }
	
	
function EnterKeyButton1(event)
{
if (document.all){
if (event.keyCode == 13){
            __doPostBack('btn_Next','1');
            event.returnValue=false;
        }}
        else if (document.getElementById){
             if (event.which == 13){
             __doPostBack('btn_Next','1');
                event.returnValue=false;
        }}
        else if(document.layers){
              if(event.which == 13){
              __doPostBack('btn_Next','1')
               event.returnValue=false;
        }} 
    }
			
// the following is a sample of function to navigate to next page where next buttons have different IDs
// it may be adjusted if needed to replace EnterKeyButton1 if errors in navigating occur
function SubscribeButton(event,btnid){
          if (document.all){
                if (event.keyCode == 13){
                                             event.returnValue = false;
          event.cancel = true;
                document.getElementById(btnid).click();
           }}
          else if (document.getElementById){
                if (event.which == 13){
                  event.preventDefault();
        document.getElementById(btnid).onclick();

          }}
          else if(document.layers){
               if(event.which == 13){
               event.returnValue = false;
              event.cancel = true;
                    document.getElementById(btnid).click();
          }} 
}

	

function KeyPress(what,e,max,action) {
	if (document.layers) {
		if (e.target.value.length >= max)
            eval(action);
		}
		else if (document.all) {
			if (what.value.length > (max-1))
				eval(action);
		}
	}


function OpenONET(url)
	{
		   window.open(url,'','left=20,top=5,width=700,height=500,toolbar=1,scrollbars=1,resizable=1,directories=0');
	}
		 

function OpenPrinterView(url)
    {
    window.open(url,'','left=20,top=5,width=900,height=600,menubar=1,scrollbars=1');
    window.close();		     
    }
	

function OpenT2(url)
	{
	        window.open(url,'','left=20,top=5,width=850,height=550,toolbar=1,scrollbars=1,resizable=1,directories=0');
	}
	
	
function _repaint(sText,sTextMessage)
    {
        sText.value=='' ? sText.value=sTextMessage : sText.value = sText.value;
	}
			  
			  
function txtCounter(field,limit)
	{
	var str;
	str = String(field.value);
	if (str.length  > limit) 
		{
 		alert ("You have reached " + limit + " - character limit.");
       	field.value = field.value.substring(0, limit);
		}			
	}
	
	
function wageOpen(soccode,stfips1) 
	{
        var url;
        var stfips;
        var Optstatus;
        var code;
        code = document.form1.hidStateFips.value;
        Optstatus = "01000000";
        if(stfips1 == "")
	        {
	            stfips = document.form1.hidStateFips.value;
			}
        else
	        {
				if (code == "00")
					{
					     stfips = stfips1;
					}
				else
					{
					   	stfips = document.form1.hidStateFips.value;
					}
		    }
	        url = "../occ_rep.asp?soccode=" + soccode + "&stfips=" + stfips + "&Optstatus=" + Optstatus + "&nodeid=2";
	        //window.open(url,'','location=1,status=1,left=20,top=20,toolbar=1,scrollbars=1,resizable=1,width=900,height=550');
	        window.open(url,'','left=20,top=5,width=700,height=500,toolbar=1,scrollbars=1,resizable=1,directories=0');
	}

