	//general functions
	// <input type=button name="CheckAll"   value="Check All" onClick="checkAll(document.myform.list)">
	// <input type=button name="UnCheckAll" value="Uncheck All" onClick="uncheckAll(document.myform.list)">
	function checkAll(field)
	{
		var Inputs = field.getElementsByTagName("input");
        for(var iCount = 0; iCount < Inputs.length; ++iCount)
        {                
            if(Inputs[iCount].type == 'checkbox')
            {
                Inputs[iCount].checked = true;
            }
        }
	}
	
	function uncheckAll(field)
	{
		var Inputs = field.getElementsByTagName("input");
        for(var iCount = 0; iCount < Inputs.length; ++iCount)
        {                
            if(Inputs[iCount].type == 'checkbox')
            {
                Inputs[iCount].checked = false;
            }
        }
	}
	
	function pop(url,width,height) {
		window.open(url,'_pop1','toolbar=no,menubar=no,location=no,height='+height+',width='+width+',scrollbars=yes').focus();		
		return false;
	}
	function _blank(href) {
		window.open(href);
		return false;
	}
	function submit(form) {
		form = document.getElementById(form);
		form.submit();
	}
	function toggleMoreLess(elementID,parent) {
		var div = document.getElementById(elementID);
		div.style.display = ('none'==div.style.display) ? 'block' : 'none';
		parent.innerHTML = ('More �'==parent.innerHTML) ? 'Less �' : 'More �';
		return false;
	}
	function toggleDiv(elementID) {
		var div = document.getElementById(elementID);
		div.style.display = ('none'==div.style.display) ? 'block' : 'none';
		return false;
	}
	function toggleDivAndClear(elementId,clearId) {
		var div = document.getElementById(elementId);
		div.style.display = ('none'==div.style.display) ? 'block' : 'none';

		if('none'==div.style.display)
		{
			var clear = document.getElementById(clearId);
			if(clear)
			{
				clear.value = '';
			}
		}
		return false;
	}
	//item management functions
	function removeItemFromList(cookieKey,id,name) {
		var path="/sys/bounceback.php5?removeItemFromList=true&cookieKey="+cookieKey+"&id="+id+"&name="+name;
		//alert(path);
		window.location=path;
		return false;
	}
	function copyToClipboard(s)
	{
		if( window.clipboardData && clipboardData.setData )
		{
			clipboardData.setData("Text", s);
		}
		else
		{
			// You have to sign the code to enable this or allow the action in about:config by changing
			user_pref("signed.applets.codebase_principal_support", true);
			netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
	
			var clip = Components.classes['@mozilla.org/widget/clipboard;[[[[1]]]]'].createInstance(Components.interfaces.nsIClipboard);
			if (!clip) return;
	
			// create a transferable
			var trans = Components.classes['@mozilla.org/widget/transferable;[[[[1]]]]'].createInstance(Components.interfaces.nsITransferable);
			if (!trans) return;
	
			// specify the data we wish to handle. Plaintext in this case.
			trans.addDataFlavor('text/unicode');
	
			// To get the data from the transferable we need two new objects
			var str = new Object();
			var len = new Object();
	
			var str = Components.classes["@mozilla.org/supports-string;[[[[1]]]]"].createInstance(Components.interfaces.nsISupportsString);
	
			var copytext=meintext;
	
			str.data=copytext;
	
			trans.setTransferData("text/unicode",str,copytext.length*[[[[2]]]]);
	
			var clipid=Components.interfaces.nsIClipboard;
	
			if (!clip) return false;
	
			clip.setData(trans,null,clipid.kGlobalClipboard);	   
		}
	}	
	
	