	var mac = (navigator.userAgent.indexOf("Mac")>-1)?true:false;
	var ie = (navigator.userAgent.indexOf("MSIE")>-1)?true:false;	
	
	function openWinPrec(u,n,fs,sc,loc,tool,dir,menu,res,stat,w,h,top,left){
		window.open(u,n,'fullscreen='+fs+',scrollbars='+sc+',location='+loc+',toolbar='+tool+',directories='+dir+',menubar='+menu+',resizable='+res+',status='+stat+',width='+w+',height='+h+',top='+top+',left='+left);
	}

	function openWin(u,n){
		openWinPrec(u,n,'no','no','no','no','no','no','no','no',512,534,0,0);
	}	

	function openSizedWin(u,n,h,w){
		openWinPrec(u,n,'no','no','no','no','no','no','no','no',w,h,0,0);
	}	
    
	function highLightCell(n){
	     //var target = 'navLeftCell'+n;
		 document.getElementById('navLeftCell'+n).style.backgroundColor='#666666';
		 document.getElementById('navLeftLink'+n).style.color='#FFFFFF';
	}

    function revertCell(n){
         //var target = 'navLeftCell'+n;
		 document.getElementById('navLeftLink'+n).style.color='#000000';             
		 document.getElementById('navLeftCell'+n).style.backgroundColor='#FFFFFF';
	}

    function MM_jumpMenu(targ,selObj,restore){ //v3.0
        eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
        if (restore) selObj.selectedIndex=0;
    }
	
	 
    //this method may be pointless, but as yet I have not found a JS method to get a cookie value

    function getCookieValue(cookieName){
	if(document.cookie.indexOf(cookieName) > -1){
		cookieVal = document.cookie;
		cookieVal = cookieVal.substring(cookieVal.indexOf(cookieName), (cookieVal.indexOf(';',cookieVal.indexOf(cookieName))) );
		cookieValParts = cookieVal.split("=");
		return cookieValParts[1];
	} else {
	  return false;
        }
    }


    function getNewCommissionList(targetObj){
		commission = targetObj.options[targetObj.selectedIndex].value;
		window.location = "index.php?node_id=1.3&commissionTypeId="+commission;

    }
    
    
    function addMiniText(text,fielditem){
        var currtext=document.forms['addForm'][fielditem].value;
        var newtest=currtext+""+text;
        document.forms['addForm'][fielditem].value=newtest;
    }
