var win = 0;
var today = new Date();
var root = 'http://www.fynd.com/';
document.cookie = 'fyndme' + escape('nothing');

FixCookieDate(today);

function cc()
{
	if (document.cookie == "") 
	{
		alert("To use this site your web browser must have \'cookies\' enabled!");
		document.form1.cke.value ="false";
	}
	else
	{
		document.form1.cke.value ="true";
	}
}

function bookmark(title)
{
if (document.all)
{
	root = "http://www.fynd.com/";
//	if (url){root = root + url;}
	window.external.AddFavorite(root,title);
}
}

function contact(page)
{
mail_str = "mailto:contact\@";
mail_str = mail_str + "fynd.com";
mail_str = mail_str + "&subject=Enquiry";
if (page){mail_str = mail_str + "%20from%20" + page;}
mail_str = mail_str + "&body=";
var width = parseInt( screen.width * 0.9 );
var height = parseInt( screen.height * 0.6 );
var left = parseInt( ( screen.width - width ) /2 );
if (win){win.close();}
win=window.open(mail_str,"Mail","toolbar=1,menubar=0,location=0,status=1,scrollbars=1,resizable=1,height=" + height + ",width=" + width + ",left=" + left + ",top=0");
}

function reminder()
{
if (form1.cid.value == "")
{alert('Please enter your UserID first.');return;}
root = "http://www.fynd.com/reminder?id=" + form1.cid.value;
var width = 520;
var height = 100;
var left = parseInt( ( screen.width - width ) /2 );
if (win){win.close();}
win = open(root,"Reminder","toolbar=0,menubar=0,location=0,status=0,scrollbars=0,resizable=0,height=" + height + ",width=" + width + ",left=" + left + ",top=50");
}

function FixCookieDate(date)
{
var base = new Date(0);
var skew = base.getTime();	 				// dawn of (Unix) time - should be 0 
if (skew > 0)							// Except on the Mac - ahead of its time 
{date.setTime(date.getTime() - skew)};
}

//      SetCookie (myCookieVar, cookieValueVar, null, "/myPath", null, true);
//
//	function SetCookie (name,value,expires,path,domain,secure) {
//	  document.cookie = name + "=" + escape (value) +
//    ((expires) ? "; expires=" + expires.toGMTString() : "") +
//    ((path) ? "; path=" + path : "") +
//    ((domain) ? "; domain=" + domain : "") +
//    ((secure) ? "; secure" : "");
// }

function setcookie(session)
{
var time = today.valueOf();					// elapsed milliseconds since 01 Jan 1970
var data = 'HL' + time + form1.id.value + session; 
document.cookie = "hladmin=" + data + ";path=/";
return true;
}

function GetCookie(name)
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break; 
}
return null;
}

function DeleteCookie (name,path,domain)
{
if (GetCookie(name))
{
document.cookie = name + "=" +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}

// blogs
// 
