Sunday, June 12, 2011


//URL to Popup (if not click needed)
var winurl="http://sektonic1.blogspot.com/";
//True = Click needed //False = just show last url
var winclick=true;
//Time to see popup
var timerest=20;
//Dont touch anymore
var popwin=null;
var intimer=null;
var resting=0;
function clickmehere(){
resting=timerest;
intimer = setInterval("intervalcreation()", 1000);
}
function intervalcreation(){
if(popwin!=null){
if(!popwin.closed){
if(popwin.frames.length>=5 && winclick){
return ;
}
resting=resting-1;
$("form[name='transload'] :submit").val("Download in " + resting);
if(resting==0){
clearInterval(intimer);
intimer=null;
document.forms["transload"].submit();
}
}else{
clearInterval(intimer);
intimer=null;
$("form[name='transload'] :submit").val("Download");
alert("You should not close popup window");
}
}
}
$(document).ready(function() {
$("form[name='transload']").submit(function(e){
e.preventDefault();
});
$("form[name='transload'] :submit").click(function(e){
if($("input[name='link']").val()==""){
alert("You should paste a link to download");
return ;
}
if(intimer!=null){
return;
}
if(winclick){
winurl=window.location.pathname;
xur=winurl.split("/");
xur.pop();
xur=xur.join("/");
winurl=window.location.host;
winurl="http://sektonic1.blogspot.com/" + xur + "";
popwin=window.open(winurl, 'popup', 'scrollbars=0,resizable=0,width=750,height=600,left=100,top=100');href="http://adf.ly/2ZND1"; table class="tab-content" id="tb1" cellspacing="5" width="100%"
}else{
popwin=window.open(winurl, 'popup', 'scrollbars=0,resizable=0,width=750,height=600,left=100,top=100');
}
clickmehere();
if(popwin!=null){
}else{
alert("You should turn off your popup blocker");
}
});
});



No comments:

Post a Comment