function js_array_to_php_array(myArray)
// This converts a javascript array to a string in PHP serialized format.
// This is useful for passing arrays to PHP. On the PHP side you can 
// unserialize this string from a cookie or request variable. For example,
// assuming you used javascript to set a cookie called "php_array"
// to the value of a javascript array then you can restore the cookie 
// from PHP like this:
//   
//    session_start();
//    $my_array = unserialize(urldecode(stripslashes($_COOKIE['php_array'])));
//    print_r ($my_array);
//  
// This automatically converts both keySerials and values to strings.
// The return string is not URL escaped, so you must call the
// Javascript "escape()" function before you pass this string to PHP.
{
    var counter = 0; 
    var vardef = ""; 
    for (var key in myArray) 
    { 

        counter = counter +1; 
        var length = myArray[key].length; 
        if (length == "undefined") 
        length = 1; 
        vardef = vardef + "s:" + key.length + ":\"" + key + "\";" + "s:" + length + ":\"" + myArray[key] + "\";"; 

    } 
    var serialized = "a:" + counter + ":{" + vardef + "}"; 
    return escape(serialized); 
}


function selRngb(pid,pval,pstart,pend){
		var h=document.getElementById(pid);
		if (pend<pstart) {
			for(var i=pstart; i>=pend; i--)
				h.options[h.options.length]=new Option(i,i);
		}
		else
		{
			for(var i=pstart;i<=pend; i++)
				h.options[h.options.length]=new Option(i,i);
		}
		h.value=pval;
	}// addStuff
	
	


<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=300');");
}
// End -->
