			function getexpirydate( nodays){
				var UTCstring;
				Today = new Date();
				nomilli=Date.parse(Today);
				Today.setTime(nomilli+nodays*24*60*60*1000);
				UTCstring = Today.toUTCString();
				return UTCstring;
			}

			function setexpiringcookie(name,value,domain,expires) {
				var expire = new Date();
				expire.setTime(expire.getTime() + 60000 * expires);
				cookiestring=name+"="+escape(value)+";domain="+escape(domain)+";expires="+expire.toGMTString() + ";path=/"; 
				document.cookie=cookiestring;
				if(!getcookie(name)){
					return false;
				} else{
					return true;
				}
			}

			function setcookie(name,value,domain) {
				cookiestring=name+"="+escape(value)+";domain="+escape(domain)+";path=/";
				document.cookie=cookiestring;
				if(!getcookie(name)){
					return false;
				} else{
					return true;
				}
			}


			function getHost() {
			    hostname = new String(document.location);
			    return cleanName(hostname);
			}
			
			function cleanName(hostname) {    
			    var index = hostname.indexOf('http://');
			    if(index != -1) {
				hostname = hostname.substring(7,hostname.length);
			    } else {
				index = hostname.indexOf('https://');
				if(index != -1) {
				    hostname = hostname.substring(8,hostname.length);
				}
			    }
			    index = hostname.indexOf('/');
			    if(index != -1) {
				hostname = hostname.substring(0,index);
			    }			    
			    index = hostname.indexOf(':');
			    if(index != -1) {
				hostname = hostname.substring(0,index);
			    }
			    return hostname;
			}

			function getReferrer() {
				return cleanName(document.referrer);
			}


		  /*
		  * This function parses comma separated name=value 
		  * argument pairs from the query string of the URL. 
		  * It stores the name=value pairs in 
		  * properties of an object and then returns that object
		  * 
		  * Jim K - From Orielly JSB pp 244
		  */
		  function getArgs() {
			  var args = new Object();
			  // Get Query String
			  var query = location.search.substring(1); 
			  // Split query at the comma
			  var pairs = query.split("&amp;"); 
			  // Begin loop through the querystring
			  for(var i = 0; i < pairs.length; i++) {
				  // Look for "name=value"
				  var pos = pairs[i].indexOf('='); 
				  // if not found, skip to next
				  if (pos == -1) continue; 
				  // Extract the name
				  var argname = pairs[i].substring(0,pos); 
				  // Extract the value
				  var value = pairs[i].substring(pos+1); 
				  // Store as a property
				  args[argname] = unescape(value); 
			  }
			  return args; // Return the Object
		  }

			function highlight_tr(rowIndex) {
				if (ie5) {
					var x=skuoptionstable.rows;
					for (i=0; i < x.length; i++) {
						x[i].style.backgroundColor='white';
					}
					x[rowIndex].style.backgroundColor='#e5e5cc';
					document.product_form.sku_option_id[rowIndex].checked = true;
				}
			}

