function getCookie(strName)
{

	var strArg = new String(strName + "=");	
	var nArgLen, nCookieLen, nEnd;
	var i = 0, j;
	
	nArgLen    = strArg.length;
	nCookieLen = document.cookie.length;
	
	if(nCookieLen > 0) {
	
		while(i < nCookieLen) {
		
			j = i + nArgLen;
			
			if(document.cookie.substring(i, j) == strArg) {
			
				nEnd = document.cookie.indexOf (";", j);
				
				if(nEnd == -1) nEnd = document.cookie.length;
				
				return unescape(document.cookie.substring(j, nEnd));
			 
			}
			
			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0) break;
		}
	}
	
	return("");
}

function setCookie(strName, strValue, dateExpires, strPath, strDomain, isSecure)
{
   
	var strCookie;
	
	if(strName == "") return ;
		   
	strCookie = strName + "=" + escape(strValue) + 
		    ((dateExpires) ? "; expires=" + dateExpires.toGMTString() : "")  + 
	      	    ((strPath)     ? "; path="    + strPath : "") + 
	      	    ((strDomain)   ? "; domain="  + strDomain : "") + 
		    ((isSecure)    ? "; secure" : "");
	
	document.cookie = strCookie; 

}



function delCookie( name )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate()-1 );
	document.cookie = name+"=; domain=imbc.com; path=/; expires="+todayDate.toGMTString()+";";
}
