//****** Advanced DHTML Popup Pro Version 2.480.0133.208.024,  Build: 168 ******

// Copyright (c) Digital Flow Software 2005-2009
// The present javascript code is property of Digital Flow Software.
// This code can only be used inside Internet/Intranet web sites located on *web servers*, as the outcome of a licensed Advanced DHTML Popup application only. 
// This code *cannot* be used inside distributable implementations (such as demos, applications or CD-based webs), unless this implementation is licensed with an "Advanced DHTML Popup License for Distributed Applications". 
// Any unauthorized use, reverse-engineering, alteration, transmission, transformation, facsimile, or copying of any means (electronic or not) is strictly prohibited and will be prosecuted.
// ***Removal of the present copyright notice is strictly prohibited***

var df,rf=false,na=navigator.userAgent,dt=document,op=(na.indexOf('Opera')!=-1),dm=(dt.getElementById)?true:false,ie5x=(dt.all&&dm),mci=(na.indexOf('Mac')!=-1);df=((ie5x||op)&&mci);
var processing = false;
decide();
function decide(){ 
    if(df) {
        return;
    }
    else {
        rf=true;
    }
}
if(rf) {
    function initADP() {
        bdf=0;
        // *** Begin advanced user scripting area ***
        htmlstring="<div style=\"position:absolute;top:0px;left:0px;background:url(/images/naggingPagePopup.png); width:500px; height:475px\"> <span style=\"position:absolute;top:345px;left:63px;cursor:hand;cursor:pointer;\"><img src=\"/images/naggingPageBtnChat.png\" width=\"365\" height=\"37\" border=\"0\" onclick=\"openChat();\" /></span> <span style=\"position:absolute;top:413px;left:213px;cursor:hand;cursor:pointer;\"><img src=\"/images/naggingPageBtnClose.png\" width=\"78\" height=\"33\" border=\"0\" onclick=\"adpHide('NaggingPage');\" /></span>  </div>                              "
        new adp("NaggingPage",htmlstring,"Backround image html");
        // *** End advanced user scripting area ***
    } //end initADP 
    
    if(window.attachEvent)  {
        window.attachEvent('onload', initADP);
    }
    else {
        if(typeof window.onload == 'function') {
            var preADP = window.onload;
            window.onload = function() {
                preADP();
                initADP();
            }
        }
        else {
            if (document.addEventListener) {
                // for Mozilla browsers
                document.addEventListener("DOMContentLoaded", initADP, false);
            }
            else {
                window.onload = initADP;
            }
        }
    } //end if(window.attachEvent)
} //end if(rf)

function runCmdSet(){//alert();
    if(GetCookie('NagPage') != 1) {
        if(!processing) {
            adpShow('NaggingPage');
            SetCookie('NagPage', 1, 30);
        }
    }
}
function openChat() {
    var lpButtonCTTUrl = 'https://server.iad.liveperson.net/hc/85735784/?cmd=file&amp;file=visitorWantsToChat&amp;site=85735784&amp;imageUrl=https://www.nu-kitchen.com/Portals/0/images/ChatButtons&amp;referrer='+escape(document.location); 
    lpButtonCTTUrl = (typeof(lpAppendVisitorCookies) != 'undefined' ? lpAppendVisitorCookies(lpButtonCTTUrl) : lpButtonCTTUrl); 
    window.open(lpButtonCTTUrl,'chat85735784','width=475,height=400,resizable=yes');
    //hide popup
    adpHide('NaggingPage');
    return false;
}

function SetCookie(name,value,minutes) { 
	if (minutes) {
		var date = new Date();
		date.setTime(date.getTime()+(minutes*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function GetCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
