/*
 Entrecard widget render script
 
 Will be loaded/included by a script containing the below params, which
 is published whenever the ecard to display changes.
 
 Inputs
    user_id -> used for getting the ecard html (published under /ecard/user_id)
                also used for drop target and button.

 Resources
    standard images
    card image
    ecard stylesheet
    
    
 Button script notes:
    cookie to track whether they're a user is "entrecard"
    drop can jump to our server, then be redirected back to set a cookie for
        last dropped, to prevent dropping client-side. Time til end of day can
        be passed as param
 
*/

var url = "http://entrecard.com/static/amazon";

function ecard_widget_new_127(user_id) {
    document.write('
<!-- Start of LiveWebDisclaimer.jsp output -->

<style type="text/css">body{margin-top:0!important;padding-top:0!important;min-width:800px!important;}#wm-ipp a:hover{text-decoration:underline!important;}</style>
<div id="wm-ipp" style="display:none; position:relative;padding:0 5px;min-height:70px;min-width:800px; z-index:9000;">
<div id="wm-ipp-inside" style="position:fixed;padding:0!important;margin:0!important;width:97%;min-width:780px;border:5px solid #000;border-top:none;background-image:url(http://staticweb.archive.org/images/toolbar/wm_tb_bk_trns.png);text-align:center;-moz-box-shadow:1px 1px 3px #333;-webkit-box-shadow:1px 1px 3px #333;box-shadow:1px 1px 3px #333;font-size:11px!important;font-family:'Lucida Grande','Arial',sans-serif!important;">
   <table style="border-collapse:collapse;margin:0;padding:0;width:100%;"><tbody><tr>
   <td style="padding:10px;vertical-align:top;min-width:110px;">
   <a href="http://wayback.archive.org/web/" title="Wayback Machine home page" style="background-color:transparent;border:none;"><img src="http://staticweb.archive.org/images/toolbar/wayback-toolbar-logo.png" alt="Wayback Machine" width="110" height="39" border="0"/></a>
   </td>
   <td style="padding:0!important;text-align:center;vertical-align:top;width:100%;">

       <table style="border-collapse:collapse;margin:0 auto;padding:0;width:570px;"><tbody><tr>
       <td style="padding:3px 0;" colspan="2">
           <form target="_top" method="get" action="http://wayback.archive.org/web/form-submit.jsp" name="wmtb" id="wmtb" style="margin:0!important;padding:0!important;"><input type="text" name="url" id="wmtbURL" value="http://entrecard.s3.amazonaws.com/widget.js?user_id=22124&amp;type=standard_127" style="width:400px;font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;" onfocus="javascript:this.focus();this.form.select();" /><input type="hidden" name="type" value="replay"><input type="hidden" name="date" value="20110918090532"><input type="submit" value="Go" style="font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;margin-left:5px;"/><span id="wm_tb_options" style="display:block;"></span></form>
       </td>
       </tr>
       <tr>
       <td style="padding:0!important;">
           <table style="border-collapse:collapse;margin:0;padding:0;width:100%;"><tbody><tr>
               <td rowspan="2" style="padding-right:10px!important;"><img src="http://staticweb.archive.org/images/toolbar/icon_alert.png" width="24" height="24" border="0" alt="Alert!"/></td>
               <td style="font-family:'Arial',sans-serif;font-size:14px;font-weight:700;color:#2eaeec; text-align:left;">The Wayback Machine hasn't archived a capture for that URL.</td>
           </tr>
           <tr>
               <td style="font-family:'Georgia',serif;font-size:13px;color:#333; text-align:left;">Here's a capture taken 0 minutes ago from the live web that will become part of the permanent archive in the next few months.</td>
           </tr></tbody></table>
       </td>
       </tr></tbody></table>
   </td>
   <td style="text-align:right;padding:5px;width:65px;font-size:11px!important;">
       <a href="javascript:;" onclick="document.getElementById('wm-ipp').style.display='none';" style="display:block;padding-right:18px;background:url(http://staticweb.archive.org/images/toolbar/wm_tb_close.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;margin-bottom:23px;background-color:transparent;border:none;" title="Close the toolbar">Close</a>
       <a href="http://faq.web.archive.org/" style="display:block;padding-right:18px;background:url(http://staticweb.archive.org/images/toolbar/wm_tb_help.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;background-color:transparent;border:none;" title="Get some help using the Wayback Machine">Help</a>
   </td>
   </tr></tbody></table>

</div>
</div>
<script type="text/javascript" src="http://staticweb.archive.org/js/disclaim-element.js" ></script>
<script type="text/javascript">
  var wmDisclaimBanner = document.getElementById("wm-ipp");
  if(wmDisclaimBanner != null) {
    disclaimElement(wmDisclaimBanner);
  }
</script>
<!-- End of LiveWebDisclaimer.jsp output -->
<iframe hspace="0" vspace="0" width="125px" style="border: 1px solid #444444;" frameborder="0" scrolling="no" src="http://web.archive.org/web/20110918090532/http://entrecard.s3.amazonaws.com/'+%20url%20+'/widget/127_standard.html?user_id='%20+%20user_id%20+%20'&nocache='+(Math.round(10000*Math.random()))+'" height="148px"></iframe>');
}

function ecard_widget_new_200(user_id) {
    document.write('<iframe hspace="0" vspace="0" width="200px" style="border: 1px solid #444444;" frameborder="0" scrolling="no" src="http://web.archive.org/web/20110918090532/http://entrecard.s3.amazonaws.com/'+%20url%20+'/widget/200_standard.html?user_id='%20+%20user_id%20+%20'&nocache='+(Math.round(10000*Math.random()))+'" height="125px"></iframe>');
}

function ecard_widget_new_250(user_id) {
    document.write('<iframe hspace="0" vspace="0" width="250px" style="border: 1px solid #444444;" frameborder="0" scrolling="no" src="http://web.archive.org/web/20110918090532/http://entrecard.s3.amazonaws.com/'+%20url%20+'/widget/250_standard.html?user_id='%20+%20user_id%20+%20'&nocache='+(Math.round(10000*Math.random()))+'" height="125px"></iframe>');
}

/* and for 200 and 250 */

function ecard_widget_render(type, user_id) {
    /* Write out widget */
    /* Select appropriate type and call */
    /*
    if (type == "standard_127") {
        ecard_widget_standard_127(user_id);
    }
    if (type == "standard_200") {
        ecard_widget_standard_200(user_id);
    }
    if (type == "standard_250") {
        ecard_widget_standard_250(user_id);
    }
    */
    if (type == "standard_127") {
        ecard_widget_new_127(user_id);
    }
    if (type == "standard_200") {
        ecard_widget_new_200(user_id);
    }
    if (type == "standard_250") {
        ecard_widget_new_250(user_id);
    }
    if (type == "new_127") {
        ecard_widget_new_127(user_id);
    }
    if (type == "new_200") {
        ecard_widget_new_200(user_id);
    }
    if (type == "new_250") {
        ecard_widget_new_250(user_id);
    }
}

function get_param(url_path, name) {
    /* Get named parameter from query string */
    name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
    
    var regexS = "[\\?&]"+name+"=([^&#]*)";
    var regex = new RegExp( regexS );
    var results = regex.exec( url_path );
    
    if( results == null )
        return "";
    else
        return results[1];
}

if (typeof ( ecard_type ) == "undefined") {
    var rand_id = "entrecard_" + Math.round(10000 * Math.random());
    document.write('<span id='+ rand_id + '></span>');
    var url_path = document.getElementById(rand_id).previousSibling.src;
    ecard_type = get_param(url_path, "type");
    ecard_user_id = get_param(url_path, "user_id");
}

function check_bans() {
    bans = ['http://borzack.com/','memhub.com','peas.in','coolninja.com','ipih.net','extremedropping.com','http://entrecards.blogspot.com','http://drop-e-drop.blogspot.com','entrecard.urgrps.com','chitgoks.com','ecdropper.googlepages.com','hyperdrop.co.cc','xyberlog'];
    for (var i=0; i<bans.length; i++) {
        if (document.location.href.match(bans[i])) {
            return true;
        }
    }
    return false;
}

if (check_bans()) {
    document.write("");
} else {
    ecard_widget_render(ecard_type, ecard_user_id);
}
>




<!--
     FILE ARCHIVED ON 9:05:32 9 18, 2011 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 9:05:32 9 18, 2011.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
-->

