﻿function IsCUITCUIL(valor)
{
  //alert(valor);
  var er_c = /^(20|23|27|30|33)-[0-9]{8}-[0-9]$/
  return er_c.test(valor);
}

function AddQMR(idProduct,idUserLookeate,step)
{
jQuery.ajax({ 
            url:  "/functions.aspx?mod=loggift&struct="+step+"|"+idProduct+"|"+idUserLookeate, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
            }
            }) 
}
function SendGiftJQuery(email,name,message,listProduct,listSend,sMessage,sIdDivLoading,idLookeate)
{
    if (idLookeate==0||idLookeate=='0') idLookeate='';
    obMessage = document.getElementById(sMessage);
    DisplayObject(sIdDivLoading,'block');
    
jQuery.ajax({ 
            url:  "/functions.aspx?mod=sendgift&struct="+email+"|"+name+"|"+message+"|"+idLookeate+"&listProduct="+listProduct+"&listSend="+listSend, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                DisplayObject(sIdDivLoading,'none');
                switch(results.split('|')[0])
                {
                    case 'ok':
                        //LoadMessageFancyBox(0,"Tu mensaje fue enviado correctamente!");
                        LoadGisftStep4();
                    break;
                    default:
                        if (obMessage!=null)
                        {
                            obMessage.innerHTML = results.split('|')[1];
                        }
                    break;                                    
                }            
            }
            }) 
}


function emailNotIsValid(email)
{
    return !(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email));
}


function AddCommentLookeate(idUserLookeate, comment, sIdDivLoading)
{
    DisplayObject(sIdDivLoading,'block');
    var sData = "mod=addLookeateComment&id=" + idUserLookeate + "&alert=" + encodeURIComponent(comment);
    jQuery.ajax({ 
        url:  "/functions.aspx", 
        type: "POST",
        data: sData,
        cache: false, 
        success: function(results) 
        {
            DisplayObject(sIdDivLoading,'none');
            switch (results.split('|')[0])
            {
                case "ok":
                    //LoadMessageFancyBox(0,"El comentario fue enviado con éxito.<br />47 Street estará publicando tu comentario en poco tiempo!");
                    window.location = window.location;
                break;
                case "login":
                    LoadMessageFancyBox(0,"Para realizar esta operación debes estar Registrado y Logueado!");
                break;
                default:
                    LoadMessageFancyBox(0,results.split('|')[1]);
                break;
            }
        }
        })     

}
function PublishLookeate(idLookeate,sIdDivLoading)
{
        DisplayObject(sIdDivLoading,'block');
jQuery.ajax({ 
            url:  "/functions.aspx?mod=publishlookeate&struct="+idLookeate, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                DisplayObject(sIdDivLoading,'none');
                switch(results.split('|')[0])
                {
                    case 'ok':
                        window.location = window.location;
                        break;
                    default:
                        LoadMessageFancyBox(0,"Por el momento no se puede realizar esta operación");
                    break;                                    
                }            
            }
            }) 
}
function RemoveLookeate(idLookeate,sIdDivLoading)
{
        DisplayObject(sIdDivLoading,'block');
jQuery.ajax({ 
            url:  "/functions.aspx?mod=removelookeate&struct="+idLookeate, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                DisplayObject(sIdDivLoading,'none');
                switch(results.split('|')[0])
                {
                    case 'ok':
                        window.location = window.location;
                        break;
                    default:
                        LoadMessageFancyBox(0,"Por el momento no se puede realizar esta operación");
                    break;                                    
                }            
            }
            }) 
}


function LoadListProductLookeate(idCategory,search,sIdLoading,sIdAfterRender,sIdRemoveContent)
{
    DisplayObject(sIdLoading,'block');
jQuery.ajax({ 
            url:  "/functions.aspx?mod=listlookeate&struct="+idCategory+"|"+unescape(search).replace('|',''), 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                DisplayObject(sIdLoading,'none');
                switch(results.split('|')[0])
                {
                    case 'error':
                        LoadMessageFancyBox(0,'error');
                    break;
                    case "ok":
                        $('#'+sIdRemoveContent).remove();
                        $('#'+sIdAfterRender).after(results.split('|')[1]);                    
                        LoadArrayLokeate();
                    break;
                    default:
                    break;                                    
                }                    
            }
            }) 
} 

function LoadChangeModel(idProduct,levelGroup,filterList,imgLoading)
{
    obLoading = document.getElementById(imgLoading);
    if (obLoading!=null) obLoading.style.visibility = 'visible';
jQuery.ajax({ 
            url:  "/functions.aspx?mod=changemodel&struct="+idProduct+"|"+(levelGroup+1)+"|"+unescape(filterList),
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                if (obLoading!=null) obLoading.style.visibility ='hidden';
                switch(results.split('|')[0])
                {
                    case 'error':
                        LoadMessageFancyBox(0,'error');
                    break;
                    case "ok":
                        SetIdProductCart(results.split('|')[1]);                    
                        $('#divGroup'+(levelGroup+1)).remove();
                        $('#divGroup'+levelGroup).after(results.split('|')[2]);                    
                    break;
                    default:
                    break;                                    
                }                    
            }
            }) 
}   
function LoadChangeModelSet(idProduct,levelGroup,filterList,imgLoading,iIndex)
{
    obLoading = document.getElementById(imgLoading);
    if (obLoading!=null) obLoading.style.visibility = 'visible';
jQuery.ajax({ 
            url:  "/functions.aspx?mod=changemodelset&struct="+idProduct+"|"+iIndex+"|"+(levelGroup+1)+"|"+unescape(filterList),
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                if (obLoading!=null) obLoading.style.visibility ='hidden';
                switch(results.split('|')[0])
                {
                    case 'error':
                        LoadMessageFancyBox(0,'error');
                    break;
                    case "ok":
                        SetIdProductCart(results.split('|')[1]);                    
                        $('#divGroup_'+iIndex+'_'+(levelGroup+1)).remove();
                        $('#divGroup_'+iIndex+'_'+levelGroup).after(results.split('|')[2]);                    
                    break;
                    default:
                    break;                                    
                }                    
            }
            }) 
}        

function LoadPageMyList(page,language,idRemove,idRender,idListSelected)
{
    list = '';
    obList = document.getElementById(idListSelected);
    if (obList!=null) list = obList.value;
    $('#'+idRemove).remove();
    $('#'+idRender).after("<div id='divLoading' align='center' style='width:100%'><img src='/img/loading.gif' border='0' /></div>");    
jQuery.ajax({ 
            url:  "/functions.aspx?mod=pagemylist&struct="+page+"|"+language+"|"+list, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                    $('#divLoading').remove();
                    $('#'+idRender).after(results.split('|')[0]);
            }
            }) 
}

function AddNewsletterUserJQuery(email,name,sIdDivLoading)
{
    DisplayObject(sIdDivLoading,'block');
    
jQuery.ajax({ 
            url:  "/functions.aspx?mod=addusernewsletter&struct="+email+"|"+name, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                DisplayObject(sIdDivLoading,'none');
                switch(results.split('|')[0])
                {
                    case 'ok':
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;
                    default:
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;                                    
                }            
            }
            }) 
}

function AddFavouriteBranchOffice(idBranchOffice,sIdDivLoading,sIdShow,sIdHidden)
{
    obHidden = document.getElementById(sIdHidden);
    obShow = document.getElementById(sIdShow);    
    DisplayObject(sIdDivLoading,'block');
    
jQuery.ajax({ 
            url:  "/functions.aspx?mod=addfavouritebranchoffice&struct="+idBranchOffice, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                DisplayObject(sIdDivLoading,'none');
                switch(results.split('|')[0])
                {
                    case 'ok':
                        if (obHidden!=null) obHidden.style.display = 'none';
                        if (obShow!=null) obShow.style.display = 'block';
                        LoadMessageFancyBox(results.split('|')[1]);
                        break;
                    case 'login':
                        LoadMessageFancyBox(0,"Debes estar logueado");                        
                        LoadLoginFancyBox(window.location);
                        break;
                    default:
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;                                    
                }            
            }
            }) 
}



function RemoveFavouriteBranchOfficeEx(idBranchOffice,sIdDivLoading)
{
        DisplayObject(sIdDivLoading,'block');
    
jQuery.ajax({ 
            url:  "/functions.aspx?mod=removefavouritebranchoffice&struct="+idBranchOffice, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                DisplayObject(sIdDivLoading,'none');
                switch(results.split('|')[0])
                {
                    case 'ok':
                        LoadMessageFancyBox(results.split('|')[1]);
                        break;
                    default:
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;                                    
                }            
            }
            }) 
}



function RemoveFavouriteBranchOffice(idBranchOffice,sIdDivLoading,sIdShow,sIdHidden)
{
    DisplayObject(sIdDivLoading,'block');
    
jQuery.ajax({ 
            url:  "/functions.aspx?mod=removefavouritebranchoffice&struct="+idBranchOffice, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                DisplayObject(sIdDivLoading,'none');
                switch(results.split('|')[0])
                {
                    case 'ok':
                        DisplayObject(sIdHidden,'none');
                        DisplayObject(sIdShow,'block');
                        LoadMessageFancyBox(results.split('|')[1]);
                        break;
                    default:
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;                                    
                }            
            }
            }) 
}


function AddProductToFavouriteJQuery(idProduct,quantity,sIdDivLoading,sIdHidden,sIdShow)
{
    obHidden = document.getElementById(sIdHidden);
    obShow = document.getElementById(sIdShow);
    DisplayObject(sIdDivLoading,'block');
    
    
jQuery.ajax({ 
            url:  "/functions.aspx?mod=addproducttofavourite&struct="+idProduct+"|"+quantity, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                DisplayObject(sIdDivLoading,'none');
                switch(results.split('|')[0])
                {
                    case 'error':
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;
                    case 'ok':
                        if (obHidden!=null) obHidden.style.display = 'none';
                        if (obShow!=null) obShow.style.display = 'block';
                        if (obHidden==null && obShow==null) window.location = window.location;
                    break;
                    default:
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;                                    
                }            
            }
            }) 
}
function RemoveProductToFavouriteJQuery(idProduct,quantity,sIdDivLoading,sIdHidden,sIdShow)
{
    obHidden = document.getElementById(sIdHidden);
    obShow = document.getElementById(sIdShow);
    DisplayObject(sIdDivLoading,'block');    
jQuery.ajax({ 
            url:  "/functions.aspx?mod=removeproducttofavourite&struct="+idProduct+"|"+quantity, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                DisplayObject(sIdDivLoading,'none');    
                switch(results.split('|')[0])
                {
                    case 'error':
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;
                    case 'ok':
                        if (obHidden!=null) obHidden.style.display = 'none';
                        if (obShow!=null) obShow.style.display = 'block';
                        if (obHidden==null && obShow==null) window.location = window.location;
                    break;
                    default:
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;                                    
                }            
            }
            }) 
}

function AddProductToCartJQuery(idProduct,quantity,sIdDivLoading,sIdAfterPopup)
{
    obAfterPopup = document.getElementById(sIdAfterPopup);
    DisplayObject(sIdDivLoading,'block');    
    //alert(idProduct);
    //alert(quantity);
jQuery.ajax({ 
            url:  "/functions.aspx?mod=addproducttocart&struct="+idProduct+"|"+quantity, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                DisplayObject(sIdDivLoading,'none');    
                switch(results.split('|')[0])
                {
                    case 'error':
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;
                    case 'alert':
                        document.getElementById('spHeaderQuantityCart').innerHTML = results.split('|')[1] + ' item(s)';
                        LoadMessageFancyBox(0,results.split('|')[2]);
                    break;
                    case 'ok':
                        document.getElementById('spHeaderQuantityCart').innerHTML = results.split('|')[1] + ' item(s)';
                        if (obAfterPopup!=null) 
                        {
                            obAfterPopup.style.display = 'block';
                            window.location.href = window.location.href.replace('#divAfterAdd','') + "#divAfterAdd";
                        }
                    break;
                    default:
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;                                    
                }            
            }
            }) 
}
function SetBackgroundPageJQuery(idBackground,pathImage)
{
//abre fancy default espera
jQuery.ajax({ 
            url:  "/functions.aspx?mod=background&struct="+idBackground, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                switch(results.split('|')[0])
                {
                    case 'error':
                    //update mensaje fancy
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;
                    case 'ok':
                    //update o oculta fancy
                        //LoadMessageFancyBox(results.split('|')[1]);
                        document.getElementById('bodyBackground').style.background = 'url(' + pathImage + ')';
                        var mySplitResult = results.split('|')[2].split('-');
                        for(i = 0; i < mySplitResult.length; i++)
                        {
	                        if (document.getElementById('a'+mySplitResult[i])!=null)
	                        {document.getElementById('a'+mySplitResult[i]).className='';}
                        }
                        document.getElementById('a'+idBackground).className = 'selected';
                    //js para cambiar fondo
                    break;
                    default:
                    //update mensaje fancy
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;                                    
                }            
            }
            }) 
}
function RecoveryPassJQuery(email, sIdDivLoading, sIdInput)
{
    obInput = document.getElementById(sIdInput);
    DisplayObject(sIdDivLoading,'block');    
    
jQuery.ajax({ 
            url:  "/functions.aspx?mod=recoverypass&struct="+email, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                DisplayObject(sIdDivLoading,'none');    
                switch(results.split('|')[0])
                {
                    case 'error':
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;
                    case 'ok':
                        if (obInput!=null) obInput.value ='';
                        LoadMessageFancyBox(results.split('|')[1]);
                        //js para cambiar fondo
                    break;
                    default:
                        LoadMessageFancyBox(results.split('|')[1]);
                    break;                                    
                }            
            }
            }) 
}


function getURLParam(strParamName){
  var strReturn = "";
  var strHref = window.location.href;
  if ( strHref.indexOf("?") > -1 ){
    var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
    var aQueryString = strQueryString.split("&");
    for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
      if ( 
aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ){
        var aParam = aQueryString[iParam].split("=");
        strReturn = aParam[1];
        break;
      }
    }
  }
  return unescape(strReturn);
}
function validateEMailFormat(sIdControl)
{
    var obj = document.getElementById(sIdControl);
    if (obj!=null)
        {return !(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(obj.value));}
    else
        {return false;}
}
function IsNumeric(sText)
{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         return false;
         }
      }
   return true;
}
function RestartValueInput(sIdControl)
{
    ob = document.getElementById(sIdControl);
    if (ob!=null)
    {
        ob.value = '';
        ob.innerHTML = '';
    }
}
function SetValueInput(sIdControl,value,concat)
{
    ob = document.getElementById(sIdControl);
    if (ob!=null)
    {
        ob.value = '';
        ob.innerHTML = '';
        if (ob.innerHTML != '' && concat) {ob.innerHTML = ob.innerHTML + '<br />'; }
        if (concat) 
        {ob.innerHTML = ob.innerHTML + value;}
        else
        {ob.innerHTML = value;}
    }
}
function ContainValue(sIdControl)
{
    ob = document.getElementById(sIdControl);
    if (ob!=null)
    {
        if (ob.value !='')
        {return true;}
        else
        {   
            if(ob.innerHTML =='')
            {return false;}
            else
            {return true;}
        }
    }
    return false;
}
function blockNonNumbers(obj, e, allowDecimal, allowNegative)
{
	var key;
	var isCtrl = false;
	var keychar;
	var reg;
		
	if(window.event) {
		key = e.keyCode;
		isCtrl = window.event.ctrlKey
	}
	else if(e.which) {
		key = e.which;
		isCtrl = e.ctrlKey;
	}
	
	if (isNaN(key)) return true;
	
	keychar = String.fromCharCode(key);
	
	// check for backspace or delete, or if Ctrl was pressed
	if (key == 8 || isCtrl)
	{
		return true;
	}

	reg = /\d/;
	var isFirstN = allowNegative ? keychar == '-' && obj.value.indexOf('-') == -1 : false;
	var isFirstD = allowDecimal ? keychar == '.' && obj.value.indexOf('.') == -1 : false;
	
	return isFirstN || isFirstD || reg.test(keychar);
}

function AddUserJQuery(username,email,pass,newsletter,birthdate,urlRedirect, sIdError, sIdDivLoading)
{
    
    obLoading = document.getElementById(sIdDivLoading);
    obError = document.getElementById(sIdError);
    if (obLoading!=null) obLoading.style.display ='block';

jQuery.ajax({ 
            url:  "/functions.aspx?mod=register&struct="+email+"|"+username+"|"+pass+"|"+newsletter+"|"+birthdate+"|"+urlRedirect, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                switch(results.split('|')[0])
                {
                    case 'error':
                        if (obLoading!=null)obLoading.style.display ='none';
                        if (obError!=null)obError.style.display ='block';
                        SetValueInput(sIdError, results.split('|')[1]);
                    break;
                    case 'registerok':
                         if (obLoading!=null)obLoading.style.display ='none';
                         window.location = urlRedirect;
                    break;
                    default:
                        if (obLoading!=null)obLoading.style.display ='none';
                        if (obError!=null)obError.style.display ='block';
                        SetValueInput(sIdError, "Se produjo un error, No se puede realizar esta operación");
                    break;                                    
                }            
            }
            }) 
}

function CheckLogin(u, p, urlRedirect, sIdError, sIdDivLoading)
{
    obLoading = document.getElementById(sIdDivLoading);
    obError = document.getElementById(sIdError);
    if (obLoading!=null) obLoading.style.display='block';
    if (obError!=null) obError.innerHTML='';
    
    var sData = "mod=login&struct=" + encodeURIComponent(u) + "|" + encodeURIComponent(p);
    jQuery.ajax({ 
        url:  "/functions.aspx", 
        type: "POST",
        data: sData,
        cache: false, 
        success: function(results) 
        {
            if (obLoading!=null) obLoading.style.display='none';
            switch (results.split('|')[0])
            {
                case "loginok":
                    window.location = urlRedirect;
                break;
                case "error":
                    obError.innerHTML = results.split('|')[1];
                break;
            }
        }
        })     

}

function LoadCountryJQuery(sIdObjectRender,sIdObLoading)
{
    ob = document.getElementById(sIdObjectRender);
    obLoading = document.getElementById(sIdObLoading);
    if (obLoading!=null) obLoading.style.display='block';
    if (ob!=null)
    {
        ob.innerHTML = "";
        jQuery.ajax({ 
            url:  "/functions.aspx?mod=country", 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                ob.innerHTML = results;
                if (obLoading!=null) obLoading.style.display='none';
            }
            })     
    }
}
function LoadStateJQuery(idCountry,sIdObjectRender,sIdObLoading)
{
    ob = document.getElementById(sIdObjectRender);
    obLoading = document.getElementById(sIdObLoading);
    if (obLoading!=null) obLoading.style.display='block';
    if (ob!=null)
    {
        ob.innerHTML = "";
        jQuery.ajax({ 
            url:  "/functions.aspx?mod=state&IdCountry=" + idCountry, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
            //alert(results);
                //ob.innerHTML = results;
                $('#'+sIdObjectRender).html(results)
                if (obLoading!=null) obLoading.style.display='none';
            }
            })     
    }
}
function LoadDepartmentJQuery(idState,sIdObjectRender,sIdObLoading)
{
    ob = document.getElementById(sIdObjectRender);
    obLoading = document.getElementById(sIdObLoading);
    if (obLoading!=null) obLoading.style.display='block';
    if (ob!=null)
    {
        ob.innerHTML = "";
        jQuery.ajax({ 
            url:  "/functions.aspx?mod=department&idState=" + idState, 
            type: "GET",
            cache: false, 
            success: function(results) 
            {
                $('#'+sIdObjectRender).html(results)
                if (obLoading!=null) obLoading.style.display='none';
            }
            })     
    }
}
function LoadLoginFancyBox(urlredirect)
{
	$.fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
	    'autoDimensions'	: true,
		'overlayColor'      : '#000',
		'overlayOpacity'	: 0.5,
		'href'              : '/modules/fancybox/login_box.aspx?urlredirect=' + urlredirect
		});
}
function LoadRegisterFancyBox(urlredirect)
{
	$.fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
	    'autoDimensions'	: true,
		'overlayColor'      : '#000',
		'overlayOpacity'	: 0.5,
		'href'              : '/modules/fancybox/signup_box.aspx?urlredirect=' + urlredirect
		});
}
function LoadMessageFancyBox(idMessage,alert)
{
	$.fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
	    'autoDimensions'	: true,
		'overlayColor'      : '#000',
		'overlayOpacity'	: 0.5,
		'href'              : '/modules/fancybox/info_box.aspx?eId='+idMessage+'&alert='+alert
		});
}
function LoadVideoYoutubeFancyBox(link)
{
	$.fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
	    'autoDimensions'	: true,
	    'scrolling'         : 'no',
	    'showCloseButton'   : true ,
		'overlayColor'      : '#000',
		'overlayOpacity'	: 0.5,
		'href'              : '/modules/fancybox/player.aspx?link='+ link
		});
}
function LoadInfoNPS(executeFunction)
{
	$.fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
	    'autoDimensions'	: true,
		'overlayColor'      : '#000',
		'overlayOpacity'	: 0.5,
		'href'              : '/modules/fancybox/info_nps.aspx?struct=' + executeFunction
		});
}
function LoadWallpaperFancyBox(id,idLanguage)
{
	$.fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'scrolling'         : 'no',
		'autoDimensions'	: false,
		'width'            : 680,
	    'height'            : 560,
		'overlayColor'      : '#000',
		'overlayOpacity'	: 0.5,
		'href'              : '/modules/fancybox/wallpaper.aspx?id=' + id + '&lId=' + idLanguage
		});
}



function LoadPostcard(idPostCard)
{
	$.fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
        'scrolling'         : 'no',
		'autoDimensions'	: false,
		'width'            : 600,
	    'height'            : 800,
		'overlayColor'      : '#000',
		'overlayOpacity'	: 0.5,
		'href'              : '/modules/fancybox/postcard.aspx?idPostCard=' + idPostCard
		});
}
function LoadLookeateSave(publish,idUserLookeate)
{
	$.fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
        'scrolling'         : 'no',
		'autoDimensions'	: true,
		'overlayColor'      : '#000',
		'overlayOpacity'	: 0.5,
		'href'              : '/modules/fancybox/lookeate_save.aspx?show='+publish+'&Id='+idUserLookeate
		});
}

function DisplayObject(id,display)
{
    ob=document.getElementById(id);
    if (ob!=null) if (ob.style.display!=display) ob.style.display = display;
}


function LoadGisftStep1(listProduct,idLookeate)
{
	$.fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
        'scrolling'         : 'no',
		'autoDimensions'	: true,
		'overlayColor'      : '#000',
		'overlayOpacity'	: 0.5,
		'href'              : '/modules/fancybox/gift/step1.aspx?listProduct='+listProduct+'&Id='+idLookeate
		});
	idProduct = 0;
	if (listProduct.toString() != '') idProduct = listProduct.toString().split('-')[0];
    AddQMR(idProduct,idLookeate,1);
}
function LoadGisftStep2(listProduct,idLookeate)
{
	$.fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
        'scrolling'         : 'no',
		'autoDimensions'	: true,
		'overlayColor'      : '#000',
		'overlayOpacity'	: 0.5,
		'href'              : '/modules/fancybox/gift/step2.aspx?listProduct='+listProduct+'&Id='+idLookeate
		});
	idProduct = 0;
	if (listProduct.toString()!='') idProduct = listProduct.toString().split('-')[0];
    AddQMR(idProduct,idLookeate,2);
		
}
function LoadGisftStep3(listProduct,listSend,idLookeate)
{
	$.fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
        'scrolling'         : 'no',
		'autoDimensions'	: true,
		'overlayColor'      : '#000',
		'overlayOpacity'	: 0.5,
		'href'              : '/modules/fancybox/gift/step3.aspx?listProduct='+listProduct+'&listSend='+listSend+'&Id='+idLookeate
		});
	idProduct = 0;
	if (listProduct.toString()!='') idProduct = listProduct.toString().split('-')[0];
    AddQMR(idProduct,idLookeate,3);
		
}
function LoadGisftStep4()
{
	$.fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
        'scrolling'         : 'no',
		'autoDimensions'	: true,
		'overlayColor'      : '#000',
		'overlayOpacity'	: 0.5,
		'href'              : '/modules/fancybox/gift/step4.aspx'
		});
    AddQMR(0,0,4);

}
function LoadCUITCUIL()
{
	$.fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
        'scrolling'         : 'no',
		'autoDimensions'	: true,
		'overlayColor'      : '#000',
		'overlayOpacity'	: 0.5,
		'href'              : '/modules/fancybox/get_document.aspx'
		});
}


