/*

This Javascript Source Code is Intellectual Property owned by FrostyLabs LLC. 
You may not do any of the following without prior written permission by FrostyLabs LLC, and not limited to:

duplicate or reuse the Service, Source Code, or any portion of it.
sell, resell, trade, or transfer ownership of the Service or any portion of it. 
take advantage of the Source Code  for any profitable purposes.

This property of FrostyLabs LLC is protected through all appropriate laws.

If you have any questions please contact www.FrostyLabs.com

*/


function putCookieInJar(name,value,days) {
 	 if (days){
    		var date = new Date();
    		date.setTime(date.getTime()+(days*24*60*60*1000));
    		var expires = "; expires="+date.toGMTString();
  	 }else{
  	 		expires = "";
  	 }

	 document.cookie = name+"="+value+expires+"; path=/";
	 
}

function grabCookieFromJar(name) {
  	var eq = name + "=";
  	var cokie = document.cookie.split(';');
  	for(var i=0;i < cokie.length;i++) {
    		var c = cokie[i];
    		while (c.charAt(0)==' '){
    			 c = c.substring(1,c.length);
    		}
    		if (c.indexOf(eq) == 0){
    			 return c.substring(eq.length,c.length);
    		}
  	}
  	return null;
}