/********************************************************************

Popup Windows - V 4.4
Author: Brian Gosselin
Site URL: http://scriptasylum.com
Read the "releasenotes.txt" for supported features and release notes.

************** EDIT THE LINES BELOW AT YOUR OWN RISK ****************/

var w3c = (document.getElementById) ? true: false;
var ns4 = (document.layers) ? true: false;
var ie5 = (w3c && document.all && !window.opera) ? true: false;
var ie6 = false
/*@cc_on || @_jscript_version < 5.7 @*/
;
var isIE = isIE();
var ie7 = (typeof document.body.style.maxHeight != "undefined" && document.all);
var strictMode = ((document.documentElement.clientWidth || document.documentElement.clientHeight) && (ie6 || ie7) && !window.opera) ? true: false;
var ns6 = (w3c && !document.all) ? true: false;
var aw_d = document;
currIDb = null;
xoff = 0;
yoff = 0;
oldac = null;
newac = null;
zdx = 50000;
mx = 0;
my = 0;
var currFb = null;
var currFs = null;
var currFID = 0;
var currFcnt = 0;
var cidlist = new Array();
var originalOverflow;

var popWidth = 400
var popHeight = 400
var windowWidth = ns6 ? window.innerWidth: document.body.clientWidth;
var windowHeight = ns6 ? window.innerHeight: document.body.clientHeight;
if (windowWidth == 0 || strictMode) windowWidth = document.documentElement.clientWidth;
if (windowHeight == 0 || strictMode) windowHeight = document.documentElement.clientHeight;
var slideAmountPerFrame = 4; // Pixel distance window moves each fram of animation
var frameLength = 5; // Milliseconds each frame of animation lasts
var slideX = 0;
var slideY = 0;
var scrollX = 0;
var scrollY = 0;
var slideXFinal = Math.round((windowWidth / 2) - (popWidth / 2));
slideXFinal = (slideXFinal < 0) ? 0 : slideXFinal;
var slideYFinal = Math.round((windowHeight / 2) - (popHeight / 2));
slideYFinal = (slideYFinal < 0) ? 0 : slideYFinal;
var slideXInterval = 0;
var slideYInterval = 0;
var slideStop;
var yOffset;
var opac_on = 0;
//******* START OF EXPOSED FUNCTIONS. THESE CAN BE USED IN HYPERLINKS. *******\\

function opacity(id, opacStart, opacEnd, millisec) { 
    //speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 

	//determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        for(i = opacStart; i >= opacEnd; i--) { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } else if(opacStart < opacEnd) { 
        for(i = opacStart; i <= opacEnd; i++) 
            { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } 
	return 0;
} 

//change the opacity for different browsers 
function changeOpac(opacity, id) { 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
} 


function fadeboxin(id) {
    if ((currFb == null) && w3c) {
        clearInterval(currFID);
        currFb = aw_d.getElementById(id + '_b');
        currFs = aw_d.getElementById(id + '_s');		
        if (currFb.style.display == 'none') {
            currFcnt = 0;
            if (ie5) currFb.style.filter = currFs.style.filter = "alpha(opacity=0)";
            else currFb.style.MozOpacity = currFs.style.MozOpacity = 0;
            hideAllScrollbars();
            currFb.style.display = currFs.style.display = 'block';
            changez(currFb);
            showbackdrop();
            currFID = setInterval('sub_fadein()', 20);
        } else currFb = null;
    }
}

function fadeboxout(id) {
    if ((currFb == null) && w3c) {
        clearInterval(currFID);
        currFb = aw_d.getElementById(id + '_b');
        currFs = aw_d.getElementById(id + '_s');
        if (currFb.style.display == 'block') {
            currFcnt = 100;
            if (ie5) {
                currFb.style.filter = "alpha(opacity=100)";
                currFs.style.filter = "alpha(opacity=50)";
            } else {
                currFb.style.MozOpacity = 1;
                currFs.style.MozOpacity = .5;
            }
            hideAllScrollbars();
            currFb.style.display = currFs.style.display = 'block';
            changez(currFb);
            hidebackdrop();
            currFID = setInterval('sub_fadeout()', 20);
        } else currFb = null;
    }
}

function hidebox(id, close) {
    if (w3c) {
        if(strstr(document.location.href, "squeezeframes.com") && close){ 
        	 window.location = "{SQUEEZE_URL}"; 
        }    
        aw_d.getElementById(id + '_b').style.display = 'none';
        aw_d.getElementById(id + '_s').style.display = 'none';
        aw_d.getElementById(id + '_fancy').style.display = 'none';		
        hidebackdrop();
    }
}

function strstr( haystack, needle, bool ) {
	var pos = 0;
	haystack += '';
	pos = haystack.indexOf( needle );
	if (pos == -1) { return false; } else{
		if( bool ){ return haystack.substr( 0, pos ); } else{ return haystack.slice( pos ); }
	}
}

function showbox(id) {
    if (w3c) {
        var bx = aw_d.getElementById(id + '_b');
        var sh = aw_d.getElementById(id + '_s');
		var f = aw_d.getElementById(id + '_fancy');
        bx.style.display = 'block';
        sh.style.display = 'block';
        f.style.display = 'block';		
        showbackdrop();
        sh.style.zIndex = ++zdx;
        bx.style.zIndex = ++zdx;
        if (ns6) {
            bx.style.MozOpacity = 1;
            sh.style.MozOpacity = 1;
            f.style.MozOpacity = 1;			
        } else {
            bx.style.filter = "alpha(opacity=100)";
            sh.style.filter = "alpha(opacity=100)";
            f.style.filter = "alpha(opacity=100)";			
        }
        changez(bx);
    }
}

function hidebackdrop() {
    clearInterval(currFID);
    clearInterval(slideStop);
    document.getElementById('lightbox_backdrop').style.display = 'none';
    if (ie6) {
        selects = document.getElementsByTagName('select');
        for (var i = selects.length - 1; i >= 0; --i) {
            selects[i].style.visibility = '';
        }
    }
    if ((ie6) || (ie7)) {
        embeds = document.getElementsByTagName('embed');
        for (var i = embeds.length - 1; i >= 0; --i) {
            embeds[i].style.visibility = '';
        }
    }
    if ((ie6) || (ie7)) {
        if (undefined == originalOverflow) originalOverflow = document.body.style.overflow ? document.body.style.overflow: document.documentElement.style.overflow;
        document.documentElement.style.overflow = originalOverflow;
        document.body.style.overflow = originalOverflow;
    } else {
        if (undefined == originalOverflow) originalOverflow = document.body.style.overflow;
        document.body.style.overflow = originalOverflow;
    }
}

function showbackdrop() {
    if (ie6) {
        selects = document.getElementsByTagName('select');
        for (var i = selects.length - 1; i >= 0; --i) {
            selects[i].style.visibility = 'hidden';
        }
    }
    document.getElementById('lightbox_backdrop').style.display = 'block';
    if ((ie6) || (ie7)) {
        if (undefined == originalOverflow) originalOverflow = document.body.style.overflow ? document.body.style.overflow: document.documentElement.style.overflow;
        document.documentElement.style.overflow = "hidden";
        document.body.style.overflow = "hidden";
    } else {
        if (undefined == originalOverflow) originalOverflow = document.body.style.overflow;
        document.body.style.overflow = "hidden";
    }
}

function changecontent(id, text) {
    if (!document.getElementById(id + '_b').isExt) {
        var aw_d = document.getElementById(id + '_c');
        if (ns6) aw_d.style.overflow = "hidden";
        aw_d.innerHTML = text;
        if (ns6) aw_d.style.overflow = "block";
    } else document.getElementById(id + '_ifrm').src = text;
}

//******* END OF EXPOSED FUNCTIONS *******\\

function hideAllScrollbars() {
    if (document.all) {
        var id;
        for (i = 0; i < cidlist.length; i++) {
            id = cidlist[i];
            if (!document.getElementById(id + '_b').isExt) document.getElementById(id + '_c').style.overflow = "hidden";
        }
    }
}

function showAllScrollbars() {
    if (document.all) {
        var id;
        for (i = 0; i < cidlist.length; i++) {
            id = cidlist[i];
            if (!document.getElementById(id + '_b').isExt) document.getElementById(id + '_c').style.overflow = "auto";
        }
    }
}

function sub_fadein() {
    currFcnt += 4;
    if (ie5) {
        currFb.style.filter = "alpha(opacity=" + currFcnt + ")";
        currFs.style.filter = "alpha(opacity=" + (currFcnt / 2) + ")";
    } else {
        currFb.style.MozOpacity = currFcnt / 100;
        currFs.style.MozOpacity = (currFcnt / 2) / 100;
    }
    if (currFcnt >= 99) {
        currFb.style.display = currFs.style.display = 'block';
        showAllScrollbars()
        currFb = null;
        clearInterval(currFID);
    }
}

function sub_fadeout() {
    currFcnt = currFcnt - 4;
    if (ie5) {
        currFb.style.filter = "alpha(opacity=" + currFcnt + ")";
        currFs.style.filter = "alpha(opacity=" + (currFcnt / 2) + ")";
    } else {
        currFb.style.MozOpacity = currFcnt / 100;
        currFs.style.MozOpacity = (currFcnt / 2) / 100;
    }
    if (currFcnt <= 0) {
        currFb.style.display = currFs.style.display = 'none';
        showAllScrollbars()
        currFb = null;
        clearInterval(currFID);
    }
}

function minimize() {
    if (w3c) {
        aw_d.getElementById(this.cid + "_b").style.height = (ie5) ? '28px': '24px';
        aw_d.getElementById(this.cid + "_s").style.height = '28px';
        aw_d.getElementById(this.cid + "_c").style.display = 'none';
        aw_d.getElementById(this.cid + "_rs").style.display = 'none';
        ns6bugfix();
    }
}

function restore() {
    if (w3c) {
        aw_d.getElementById(this.cid + "_b").style.height = this.h + 'px';
        aw_d.getElementById(this.cid + "_s").style.height = (ie5) ? this.h + 'px': this.h + 5 + 'px';
        aw_d.getElementById(this.cid + "_c").style.display = 'block';
        aw_d.getElementById(this.cid + "_rs").style.display = 'block';
        ns6bugfix();
    }
}

function ns6bugfix() {
    if (navigator.userAgent.indexOf("Netscape/6") > 0) setTimeout('self.resizeBy(0,1); self.resizeBy(0,-1);', 100);
}

function trackmouse(evt) {
    mx = (ie5) ? event.clientX + aw_d.body.scrollLeft: evt.pageX;
    my = (ie5) ? event.clientY + aw_d.body.scrollTop: evt.pageY;
    if (!ns6) movepopup();
    if (currIDb != null) return false;
}

function movepopup() {
    if ((currIDb != null) && w3c) movePopup(currIDb.cid, mx + xoff, my + yoff);
    return false;
}

function changez(v) {
    var th = (v != null) ? v: this;
    // if(oldac!=null)aw_d.getElementById(oldac.cid+"_t").style.backgroundColor=oldac.inactivecolor;
    if (ns6) aw_d.getElementById(th.cid + "_c").style.overflow = 'auto';
    oldac = th;
    // aw_d.getElementById(th.cid+"_t").style.backgroundColor=th.activecolor;
    aw_d.getElementById(th.cid + "_s").style.zIndex = ++zdx;
    th.style.zIndex = ++zdx;
    aw_d.getElementById(th.cid + "_rs").style.zIndex = ++zdx;
}

function stopdrag() {
    currIDb = null;
    document.getElementById(this.cid + "_extWA").style.display = "none";
    ns6bugfix();
}

function grab_id(evt) {
    var ex = (ie5) ? event.clientX + aw_d.body.scrollLeft: evt.pageX;
    var ey = (ie5) ? event.clientY + aw_d.body.scrollTop: evt.pageY;
    xoff = parseInt(aw_d.getElementById(this.cid + "_b").style.left) - ex;
    yoff = parseInt(aw_d.getElementById(this.cid + "_b").style.top) - ey;
    currIDb = aw_d.getElementById(this.cid + "_b");
    currIDs = aw_d.getElementById(this.cid + "_s");
    aw_d.getElementById(this.cid + "_extWA").style.display = "block";
    return false;
}

function subBox(x, y, w, h, bgc, id) {
    var v = aw_d.createElement('div');
    v.setAttribute('id', id);
    v.style.position = 'absolute';
    v.style.left = x + 'px';
    v.style.top = y + 'px';
    v.style.width = w + 'px';
    v.style.height = h + 'px';
    if (bgc != '') v.style.backgroundColor = bgc;
    v.style.visibility = 'visible';
    v.style.padding = '0px';
    return v;
}

function bgBox(bgc, id) {
    var v = aw_d.createElement('div');
    v.setAttribute('id', id);
    v.style.position = 'absolute';
    v.style.top = yOffset + 'px';
    v.style.left = '0px';
    v.style.width = '100%';
    v.style.height = (ie6) ? windowHeight: '100%';
    if (bgc != '') v.style.backgroundColor = bgc;
    v.style.visibility = 'visible';
    v.style.opacity = '.75';
    v.style.padding = '0px';
    return v;
}

function get_cookie(Name) {
    var search = Name + "=";
    var returnvalue = "";
    if (aw_d.cookie.length > 0) {
        offset = aw_d.cookie.indexOf(search);
        if (offset != -1) {
            offset += search.length;
            end = aw_d.cookie.indexOf(";", offset);
            if (end == -1) end = aw_d.cookie.length;
            returnvalue = unescape(aw_d.cookie.substring(offset, end));
        }
    }
    return returnvalue;
}

function esc_listener(e) {
    var evtobj = window.event ? event: e;
    var keycode = evtobj.keyCode;
    if (keycode == 27) {
        hidebox(cidlist[0]);
    }
}

function fixpng(o,i){
	o.style.background = 'none';
	o.style.filter= "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod='scale', src='"+i+"')";
}

function popUp(x, y, w, h, cid, text, bgcolor, textcolor, fontstyleset, title, titlecolor, titletextcolor, bordercolor, scrollcolor, shadowcolor, showonstart, isdrag, isresize, oldOK, isExt, popOnce) {
    if ((ie6 || ie7) && strictMode) {
        yOffset = document.documentElement.scrollTop;
        slideYFinal = yOffset + slideYFinal;
    } else if (ie6 || ie7) {
        yOffset = document.body.scrollTop;
    } else {
        yOffset = window.pageYOffset;
        slideYFinal = yOffset + slideYFinal;
    }
    y = y + yOffset;
    var okPopUp = false;
    var cid = cid;
    if (popOnce) {
        if (get_cookie(cid) == "") {
            okPopUp = true;
            aw_d.cookie = cid + "=yes"
        }
    }
    else okPopUp = true;
    if (okPopUp) {
        if (w3c) {
            cidlist[cidlist.length] = cid;
            w = Math.max(w, 100);
            h = Math.max(h, 80);
            var rdiv = new subBox(w - ((ie5 && !strictMode) ? 12 : 8), h - ((ie5 && !strictMode) ? 12 : 8), 7, 7, '', cid + '_rs');
            var tw = (ie5 && !strictMode) ? w: w + 4;
            var th = (ie5 && !strictMode) ? h: h + 6;

            var backdrop = new bgBox(shadowcolor, 'lightbox_backdrop');
            if (ie5) backdrop.style.filter = "alpha(opacity=0)"; else backdrop.style.MozOpacity = 0.0;
            backdrop.style.zIndex = ++zdx;
			
			var obyo = 0;
			if(isIE) { obyo = 3; obwo = 3; obho = 4; } else { obyo = 3;	obwo = 2; obho = 2;	}
			
			var outerdiv = new subBox(x, y+obyo, w-obwo, h-obho, bordercolor, cid + '_b');
            outerdiv.style.zIndex = ++zdx;
			outerdiv.style.display = "block";
            outerdiv.style.borderStyle = "outset";
            outerdiv.style.borderWidth = "0px";
            outerdiv.style.borderColor = bordercolor;
			outerdiv.style.backgroundColor = 'white'			
			//outerdiv.style.background = 'transparent';

			var fx, fy, fw, fh, fhc, fvc;
			if(isIE) { fx = x-20; fy = y-26; fw = w+40;	fh = h+52; fhc = w+14; fvc = h+14;
			} else { fx = x-20; fy = y-25; fw = w+40; fh = h+50; fhc = w+14; fvc = h+14; }

			var strokediv = new subBox(13, 18, w+14, h+18, bordercolor, cid + '_stroke');
            strokediv.style.zIndex = ++zdx;
			strokediv.style.display = "block";
            strokediv.style.borderStyle = "solid";
            strokediv.style.borderWidth = "1px";
            strokediv.style.borderColor = "black";
			strokediv.style.backgroundColor = 'white';
            if (ie5) strokediv.style.filter = "alpha(opacity=100)"; else strokediv.style.MozOpacity = 1;	


			var fancydiv = new subBox(fx, fy, fw, fh, bordercolor, cid + '_fancy');
            fancydiv.style.zIndex = ++zdx;
			fancydiv.style.display = "block";
            fancydiv.style.borderStyle = "outset";
            fancydiv.style.borderWidth = "0px";
            fancydiv.style.borderColor = bordercolor;
			fancydiv.style.background = 'transparent';

			var fbgn=document.createElement('div');fbgn.id='fancy_bg_n';
			fbgn.style.position = 'absolute';				
			fbgn.style.top = '0px';
			fbgn.style.left = '13px';				
			fbgn.style.width = fhc + 'px';
			fbgn.style.height = '18px';
			fbgn.style.display = 'block';
			if(isIE) fixpng(fbgn, 'http://www.listwire.com/forms/fancy_shadow_n.png'); else fbgn.style.background = 'transparent url(http://www.listwire.com/forms/fancy_shadow_n.png) repeat-x';
			
			var fbgne= document.createElement('div');fbgne.id='fancy_bg_ne';
			fbgne.style.position = 'absolute';
			fbgne.style.top = '0px';
			fbgne.style.right = '0px';				
			fbgne.style.width = '13px';
			fbgne.style.height = '18px';
			fbgne.style.display = 'block';
			if(isIE) fixpng(fbgne, 'http://www.listwire.com/forms/fancy_shadow_ne.png'); else fbgne.style.background = 'transparent url(http://www.listwire.com/forms/fancy_shadow_ne.png) no-repeat';
			
			var fbge= document.createElement('div'); fbge.id='fancy_bg_e';
			fbge.style.position = 'absolute';	
			if(isIE) fbge.style.top = '19px'; else fbge.style.top = '18px';
			fbge.style.right = '0px';				
			fbge.style.width = '13px';
			fbge.style.height = fvc + 'px';
			fbge.style.display = 'block';
			if(isIE) fixpng(fbge, 'http://www.listwire.com/forms/fancy_shadow_e.png'); else fbge.style.background = 'transparent url(http://www.listwire.com/forms/fancy_shadow_e.png) repeat-y';
			
			var fbgse= document.createElement('div'); fbgse.id='fancy_bg_se';
			fbgse.style.position = 'absolute';				
			fbgse.style.bottom = '0px';
			fbgse.style.right = '0px';				
			fbgse.style.width = '13px';
			fbgse.style.height = '18px';
			fbgse.style.display = 'block';
			if(isIE) fixpng(fbgse, 'http://www.listwire.com/forms/fancy_shadow_se.png'); else fbgse.style.background = 'transparent url(http://www.listwire.com/forms/fancy_shadow_se.png) no-repeat';
			
			var fbgs= document.createElement('div'); fbgs.id='fancy_bg_s';
			fbgs.style.position = 'absolute';			
			fbgs.style.bottom = '0px';
			fbgs.style.left = '13px';				
			fbgs.style.width = fhc + 'px';
			fbgs.style.height = '18px';
			fbgs.style.display = 'block';
			if(isIE) fixpng(fbgs, 'http://www.listwire.com/forms/fancy_shadow_s.png'); else fbgs.style.background = 'transparent url(http://www.listwire.com/forms/fancy_shadow_s.png) repeat-x';
			
			var fbgsw= document.createElement('div'); fbgsw.id='fancy_bg_sw';
			fbgsw.style.position = 'absolute';
			fbgsw.style.bottom = '0px';
			fbgsw.style.left = '0px';				
			fbgsw.style.width = '13px';
			fbgsw.style.height = '18px';
			fbgsw.style.display = 'block';
			if(isIE) fixpng(fbgsw, 'http://www.listwire.com/forms/fancy_shadow_sw.png'); else fbgsw.style.background = 'transparent url(http://www.listwire.com/forms/fancy_shadow_sw.png) no-repeat';
			
			var fbgw= document.createElement('div'); fbgw.id='fancy_bg_w';
			fbgw.style.position = 'absolute';
			if(isIE) fbgw.style.top = '19px'; else fbgw.style.top = '18px';
			fbgw.style.left = '0px';				
			fbgw.style.width = '13px';
			fbgw.style.height = fvc + 'px';
			fbgw.style.display = 'block';
			if(isIE) fixpng(fbgw, 'http://www.listwire.com/forms/fancy_shadow_w.png'); else fbgw.style.background = 'transparent url(http://www.listwire.com/forms/fancy_shadow_w.png) repeat-y';

			var fbgnw= document.createElement('div'); fbgnw.id='fancy_bg_nw';
			fbgnw.style.position = 'absolute'				
			fbgnw.style.top = '0px';
			fbgnw.style.left = '0px';				
			fbgnw.style.width = '13px';
			fbgnw.style.height = '18px';
			fbgnw.style.display = 'block';
			if(isIE) fixpng(fbgnw, 'http://www.listwire.com/forms/fancy_shadow_nw.png'); else fbgnw.style.background = 'transparent url(http://www.listwire.com/forms/fancy_shadow_nw.png) no-repeat';
			
			fancydiv.appendChild(fbgn);
			fancydiv.appendChild(fbgne);
			fancydiv.appendChild(fbge);			
			fancydiv.appendChild(fbgse);						
			fancydiv.appendChild(fbgs);
			fancydiv.appendChild(fbgsw);			
			fancydiv.appendChild(fbgw);			
			fancydiv.appendChild(fbgnw);
			fancydiv.appendChild(strokediv);			
			
			var content = new subBox(1, 1, w-obwo, h-obho, bgcolor, cid + '_c');
            content.style.borderColor = bordercolor;
            content.style.borderWidth = "0px";
			content.style.zIndex = ++zdx;			
            if (isExt) {
                content.innerHTML = '<iframe id="' + cid + '_ifrm" src="' + text + '" width="100%" height="100%"></iframe>';
                content.style.overflow = "hidden";
            } else {
                if (ie5) content.style.scrollbarBaseColor = scrollcolor;
                content.style.borderStyle = "inset";
                content.style.overflow = "auto";
                content.style.padding = "0px 0px 0px 0px";
                content.innerHTML = text;
                content.style.font = fontstyleset;
                content.style.color = textcolor;
                content.style.MozOpacity = 1;
            }

			var sxc, syc;
			if(isIE) { sxc = 21; syc = 21; } else { sxc = 20; syc = 20;	}
			if(ie7) { sxc = 22; syc = 22; }

            var shadow = new subBox(x - sxc, y - syc, tw + (sxc*2), th + (syc*2), shadowcolor, cid + '_s');
			shadow.style.background = 'transparent';
			if (ie5) shadow.style.filter = "alpha(opacity=100)"; else shadow.style.MozOpacity = 1;
			shadow.style.background = 'transparent';
			
			var cl=document.createElement('div'); cl.id='fancy_close';
			cl.onclick = new Function("hidebox('" + cid + "', 'close');");			
			cl.style.position = 'absolute';
			cl.style.top = '0px';
			cl.style.right = '0px';
			cl.style.height = '30px';
			cl.style.width = '30px';
			if(isIE) fixpng(cl, 'http://www.listwire.com/forms/fancy_closebox.png'); else cl.style.background = 'url(http://www.listwire.com/forms/fancy_closebox.png) top left no-repeat';

			cl.style.cursor = 'pointer';
			shadow.appendChild(cl);  

            var extWA = new subBox(2, 24, 0, 0, '', cid + '_extWA');
            extWA.style.display = "none";
            extWA.style.width = '100%';
            extWA.style.height = '100%';
            outerdiv.appendChild(content);
			outerdiv.appendChild(extWA);
            outerdiv.appendChild(rdiv);
            document.body.insertBefore(backdrop, document.body.childNodes[0]);
            aw_d.body.appendChild(outerdiv);
            aw_d.body.appendChild(fancydiv);			
            aw_d.body.appendChild(shadow);
            aw_d.gEl = aw_d.getElementById;
			
            if (!showonstart) hidebox(cid);
            var wB = aw_d.gEl(cid + '_b');
            wB.cid = cid;
            wB.isExt = (isExt) ? true: false;
            var wEXTWA = aw_d.gEl(cid + '_extWA');
            wB.activecolor = titlecolor;
            wB.inactivecolor = scrollcolor;
            // if(oldac!=null)aw_d.gEl(oldac.cid+"_t").style.backgroundColor=oldac.inactivecolor;
            oldac = wB;
            wB.onmousedown = function () {
                changez(this)
            }
            if (document.addEventListener) document.addEventListener('keypress', esc_listener, true);
            else document.onkeypress = esc_listener;
        } else {
            if (oldOK) {
                var ctr = new Date();
                ctr = ctr.getTime();
                var t = (isExt) ? text: '';
                var posn = (ns4) ? 'screenX=' + x + ',screenY=' + y: 'left=' + x + ',top=' + y;
                var win = window.open(t, "abc" + ctr, "status=no,menubar=no,width=" + w + ",height=" + h + ",resizable=no,scrollbars=yes," + posn);
                if (!isExt) {
                    t = '<html><head><title>' + title + '</title></head><body bgcolor="' + bgcolor + '"><font style="font:' + fontstyleset + '; color:' + textcolor + '">' + text + '</font></body></html>';
                    win.document.write(t);
                    win.document.close();
                }
            }
        }
    }
}

if (ns6) setInterval('movepopup()', 40);

if (w3c) {
    aw_d.onmousemove = trackmouse;
}

function setCookie(name, value, expires, path, domain, secure) {
	var curCookie = name + "=" + escape(value) +
	((expires) ? "; expires=" + expires.toGMTString() : "") +
	((path) ? "; path=" + path : "") +
	((domain) ? "; domain=" + domain : "") +
	((secure) ? "; secure" : "");
	document.cookie = curCookie;
}

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));
}

if(!getCookie('lwpopup_18283')|| getCookie('lwpopup_18283')) {
	var mydate = new Date();
	mydate.setTime(mydate.getTime() + -86400000);
	setCookie('lwpopup_18283', '1', mydate, '/', document.domain, 0);

	function launcher() {
	new popUp(slideXFinal, slideYFinal, 400, 450, "pop1", "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"position: relative; margin: 0px; padding: 0px; width: 100%; height: 100%;\"><tr><td align=\"center\" valign=\"middle\"><form action=\"http://www.listwire.com/form/process.php\" method=\"post\"><input type=\"hidden\" name=\"bot_action\" value=\"form_subscribe\"><input type=\"hidden\" name=\"bot_track_code\" value=\"\"><input type=\"hidden\" name=\"bot_pass_standard\" value=\"0\"><input type=\"hidden\" name=\"bot_pass_custom\" value=\"0\"><input type=\"hidden\" name=\"bot_account\" value=\"free101book\"><input type=\"hidden\" name=\"bot_redirect\" value=\"http://101brilliantbusinessideas.blogspot.com\"><input type=\"hidden\" name=\"bot_web_form_id\" value=\"18283\"><table width=\"380\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td colspan=\"3\" valign=\"middle\" style=\"padding:0px 0px 10px 0px;\"><strong>This is a unique opportunity for you to INSTANTLY download a FREE sample copy of the book <em>101 BRILLIANT BUSINESS IDEAS THAT WILL THRIVE IN KENYA</em>. Complete with full colour cover and pages of valuable ideas that will just blow your mind away. We value your privacy so we will NEVER share your information with anybody. Fill in your name and email address below.</strong></td></tr><tr><td height=\"32\" width=\"10%\" align=\"left\" valign=\"middle\">&nbsp;</td><td height=\"32\" width=\"28%\" align=\"left\" valign=\"middle\"><div style=\"font:bold 13px verdana, sans-serif; letter-spacing:-1px; color:#363636; margin:0px 5px 0px 0px;\">Name:</div></td><td height=\"32\" width=\"62%\" align=\"left\" valign=\"middle\"><input type=\"text\" style=\"width:85%; margin:0 auto; font:12px verdana, sans-serif; height:22px; line-height:100%; padding:4px 2px 2px 2px; border:1px solid #363636; background:#ffffff url(\'http://forms.listwire.com/images/form-input-bg.jpg\') top left repeat-x;\" name=\"fullname\" value=\"\"></td></tr><tr><td height=\"32\" width=\"10%\" align=\"left\" valign=\"middle\">&nbsp;</td><td height=\"32\" width=\"28%\" align=\"left\" valign=\"middle\"><div style=\"font:bold 13px verdana, sans-serif; letter-spacing:-1px; color:#363636; margin:0px 5px 0px 0px;\">Email:</div></td><td height=\"32\" width=\"62%\" align=\"left\" valign=\"middle\"><input type=\"text\" style=\"width:85%; margin:0 auto; font:12px verdana, sans-serif; height:22px; line-height:100%; padding:4px 2px 2px 2px; border:1px solid #363636; background:#ffffff url(\'http://forms.listwire.com/images/form-input-bg.jpg\') top left repeat-x;\" name=\"email\" value=\"\"></td></tr><tr><td height=\"50\" colspan=\"3\" align=\"center\" valign=\"middle\"><table style=\"border: 1px solid #363636;\" cellpadding=\"0\" cellspacing=\"0\"><tr style=\"background-color:#e8e8e8\"><td height=\"26\" style=\"border-top:1px solid #ffffff; border-left:1px solid #ffffff;\"><input type=\"submit\" style=\"overflow:auto !important; overflow:visible; width:auto !important; width:50px; margin:0px 15px 0px 15px; border:0px; background-color:#e8e8e8; font: bold 13px verdana, sans-serif; letter-spacing:-1px; color:#363636;\" name=\"submit\" value=\"Submit\"></td></tr></table></td></tr></table></form></td></tr><tr><td colspan=2 valign=\"bottom\"><center><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" valign=\"bottom\"><tr style=\"background-color: #c0c0c0;\"><td height=\"1\" align=\"center\" valign=\"top\"></td></tr><tr style=\"background-color: #ffffff;\"><td style=\"padding: 5px 0px 0px 0px;\" height=\"32\" align=\"center\" valign=\"top\"><table width=\"300\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr style=\"background-color: #ffffff;\"><td style=\"padding: 0px 0px 10px 0px;\" align=\"center\" valign=\"top\"><a  href=\"http://www.listwire.com/free101book\" target=\"_lw\" title=\"ListWire - Free Autoresponders\"><img src=\"http://forms.listwire.com/images/listwire-form-logo.jpg\" height=\"32\" width=\"128\" border=\"0\" alt=\"ListWire - Free Autoresponders\"></a><br><a onmouseover=\"this.style.color=\'#22c1eb\';\" onmouseout=\"this.style.color=\'#000000\';\" href=\"http://www.listwire.com/free101book\" target=\"_lw\" style=\"font: normal 10px verdana, sans-serif; color: #000000;\" title=\"ListWire - Free Autoresponders\">click here for your free autoresponder</a></td></tr></table></td></tr></table></center></td></tr></table>", "#fff100", "black", "10pt sans-serif", "This is the title!", "#0F72BB", "white", "lightgrey", "#6DBAF3", "black", false, true, false, true, false, false);
    
    opacity('lightbox_backdrop', 0, 25, 4000);
    showbox('pop1');
	unique_track = new Image();
	unique_track.src = "http://forms.listwire.com/img.php?xzAMu2LGc0plbHJMMGZLAKJRkHp51FLgqHYVMJpGOUr";

	}
	setTimeout('launcher();', 3 * 1000);
}

function isIE(){ return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);}
