
		
			function getDataCookie(cookieName) {
				var data = '';
				if (navigator.cookieEnabled) data = getCookie(cookieName);
				if (data == '') data = 'cas';
				return data;
			}
		
			function changeStyle(newStyle) {
				if (navigator.cookieEnabled) {
					setCookie('styleName',newStyle);
					location.href = self.location;
				}
				else alert('Usdted necesita activar las Cookie para usar este sitio. Por favor active las Cookies.');
			}				


function acceptCookies() {
	var gCookieValueRet;
	document.cookie = "test=true";
	gCookieValueRet=getCookie("test");
	return gCookieValueRet;
}

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}	
		
function fnVerify(){
	if (!oHomePage.isHomePage('http://www.liquidacionporderribo.com') && !oHomePage.isHomePage('http://www.liquidacionporderribo.com/'))
	{
	return 1;
	}
}
		
function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function validBrowser() {
	brow_Ver = parseFloat(navigator.appVersion); 
	if (navigator.appName == "Microsoft Internet Explorer" && 
		(navigator.userAgent.indexOf("IE 5") > -1 || 
		navigator.userAgent.indexOf("IE 6") > -1) &&
		navigator.platform.indexOf("Win16") == -1)
	{
		return 1;
	}
	return 0;
}

function setHomePage() 
{ 
	if (acceptCookies())
	{
		if (validBrowser() && fnVerify() && getCookie("wanthomepage")!='false') 
		{
			if (confirm('Haz de LIQUIDACIONPORDERRIBO.COM la página de inicio  \n(Si no aceptas no se te volverá a preguntar)')) 
			{
				!oHomePage.setHomePage('http://www.liquidacionporderribo.com');
				return false;	
			} else {
				createCookie("wanthomepage","false","60");
				alert(getCookie('wanthomepage'));
			}
		}
	}
} 

//alert(getCookie('wanthomepage'));

