<script type="text/javascript">
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function d64(input) {
var output = "";
var chr1, chr2, chr3 = "";
var enc1, enc2, enc3, enc4 = "";
var i = 0;
var base64test = /[^A-Za-z0-9\+\/\=]/g;
if (base64test.exec(input)) {
}
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
do {
enc1 = keyStr.indexOf(input.charAt(i++));
enc2 = keyStr.indexOf(input.charAt(i++));
enc3 = keyStr.indexOf(input.charAt(i++));
enc4 = keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
chr1 = chr2 = chr3 = "";
enc1 = enc2 = enc3 = enc4 = "";
} while (i < input.length);
return unescape(output);
}
function jloaded(){
$('instructs').style.display = 'none';
$('timeoutprocess').style.display = 'block';
$('loader').innerHTML = '<b style="color:#222;"> Processing links, please wait...</b>';
}
function kv_info(kv_title, kv_site, kv_url, kv_imgurl){
var loc = unescape(window.location.toString().split('url=')[1]);
if($('kv_info').innerHTML == '') $('kv_info').innerHTML = '<a href="'+kv_url+'" class="top-videos-a" target="_blank"><img src="'+kv_imgurl+'" class="top-videos-img"></a><div class="top-videos-div"><a href="'+kv_url+'" class="top-videos-a" target="_blank">'+kv_title+'</a><br>'+kv_site+'</div><br clear="left"><br>';
}
function kv_error(er){
$('loader').style.display = 'none';
$('loaderimg').style.display = 'none';
$('errormsg').innerHTML = '<b style="color:#222;">Error: ' + er + '</b>';
}
function kv_ds(a_id, kv_type, kv_res, kv_url, kv_title){
var kv_dri='';var kv_more='';
if(kv_url.match("veoh.com") || kv_url.match("zshare.net")) kv_more=' (Drag download link to a new tab, then press <b>Ctrl+S</b> if it starts playing in the browser)';
if(kv_url.match("youtube.com") == null && (kv_type == "MP3" || kv_type == "MP4")){
kv_dri='javascript:alert(\'Right-Click the download link and choose \\\'Save Link As...\\\'\');return false;';
//kv_more=' (<b>Right-Click</b> the download link and choose <b>Save Link As...</b>)';
}
if($('linkse1').innerHTML=='' && (loc.match("youtube.com") || loc.match("youtu.be"))) $('linkse1').innerHTML = '<span style="color:#8B0000;"><b>*NEW*</b></span> <a href="'+unescape(window.location.href.toString().replace("keepvid.com", "snipmp3.com"))+'" class="link" target="_blank">›› Download MP3 ‹‹</a> - Standard Quality (<a href="http://snipmp3.com/" target="_blank">SnipMP3.com</a>)';
$('loader').style.display='none';
$('loaderimg').style.display = 'none';
var kv_color='';
if(kv_type=='3GP') kv_color='color:#2EADC9;';
if(kv_type=='FLV') kv_color='color:#BF6D1B;';
if(kv_type=='MP4') kv_color='color:#436DBA;';
var e=$("linkse");
var nd=d.createElement("div");
if(a_id.match("^"+"dl_")=="dl_" || a_id.match("^"+"gv_")=="gv_") { kv_url = kv_url+'&title='+kv_title; }
nd.innerHTML='<a href="'+kv_url+'" class="link" onclick="'+kv_dri+'" style="'+kv_color+'">›› Download '+kv_type+' ‹‹</a> - '+kv_res+kv_more;
e.appendChild(nd);
}
setTimeout("if($('loader').innerHTML == '<b style=\"color:#222;\"> Processing links, please wait...</b>'){$('loaderimg').style.display = 'none';$('loader').innerHTML='<b style=\"color:#222;\">Error: Sorry, took too long (Try Refresh?).</b><br />';}else if($('loader').style.display != 'none'){$('loaderimg').style.display = 'none';$('loader').innerHTML='<b style=\"color:#222;\">Error: Please restart your browser and remember to click 'Run' when prompted.</b><br>';}", 30000);
</script>