...

View Full Version : Script not working lately



iknowu99
09-29-2008, 12:19 AM
Hello All!

I had a website long long time ago that worked....now it doesnt ...please help me modify and update.

The script used to have a timer line that ran across the bottom of index page then it directs users to a new website. second goal is to have the mouse cursor turn into a full screen crosshair. this code seems to be not workin in firefox and after allowing active x i can do it. This is the goal. Maybe rewritting this in php would work? or somethine else....



<html>
<head>

<script type="text/javascript">
function blankCur(){
if (document.getElementsByTagName){
var allCursors=document.getElementsByTagName('*')
for (i = 0; i < allCursors.length; i++)
allCursors[i].style.cursor="url('blank.cur'),crosshair"
}
}

if ( typeof window.attachEvent != "undefined" ) {
window.attachEvent( "onload", blankCur );
}
</script>









</head><BODY bgcolor="lightgrey"><BR>
<BR>
<BR>
<BR>



<script language="JavaScript1.2">
<!--

top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//-->
</script>



<style>
<!--
#leftright, #topdown{
position:absolute;
left:0;
top:0;
width:1px;
height:1px;
layer-background-color:black;
background-color:white;
z-index:100;
font-size:1px;
}
-->
</style>










<title>MF</title>






<script language="JavaScript1.2">

if (document.all||document.getElementById){
var thetitle=document.title
document.title=''
}

var data="7340851269";

var done=1;
function statusIn(text){
decrypt(text,2,1);
}

function statusOut(){
self.status='';
done=1;
}

function decrypt(text, max, delay){
if (done){
done = 0;
decrypt_helper(text, max, delay, 0, max);
}

}

function decrypt_helper(text, runs_left, delay, charvar, max){
if (!done){
runs_left = runs_left - 1;
var status = text.substring(0,charvar);
for(var current_char = charvar; current_char < text.length; current_char++){
status += data.charAt(Math.round(Math.random()*data.length));
}
document.title = status;
var rerun = "decrypt_helper('" + text + "'," + runs_left + "," + delay + "," +

charvar + "," + max + ");"
var new_char = charvar + 1;
var next_char = "decrypt_helper('" + text + "'," + max + "," + delay + "," +

new_char + "," + max + ");"
if(runs_left > 0){
setTimeout(rerun, delay);
}
else{
if (charvar < text.length){
setTimeout(next_char, Math.round(delay*(charvar+3)/(charvar+1)));
}
else
{
done = 1;
}
}
}
}


if (document.all||document.getElementById)
statusIn(thetitle)
</script>







<script language="JavaScript">
<!--
javascript:window.history.forward(1);

</script>






<div id="leftright" style="width:expression(document.body.clientWidth-2)"></div>
<div id="topdown" style="height:expression(document.body.clientHeight-2)"></div>

<p align="center"> <i><b><font face="Arial, Helvetica, sans-serif" size="2"

color="#808080">
<script language="JavaScript1.2">
<!--



if (document.all&&!window.print){
leftright.style.width=document.body.clientWidth-2
topdown.style.height=document.body.clientHeight-2
}
else if (document.layers){
document.leftright.clip.width=window.innerWidth
document.leftright.clip.height=1
document.topdown.clip.width=1
document.topdown.clip.height=window.innerHeight
}


function followmouse1(){
leftright.style.pixelTop=document.body.scrollTop+event.clientY+1
topdown.style.pixelTop=document.body.scrollTop
if (event.clientX<document.body.clientWidth-2)
topdown.style.pixelLeft=document.body.scrollLeft+event.clientX+1
else
topdown.style.pixelLeft=document.body.clientWidth-2
}

function followmouse2(e){
document.leftright.top=e.y+1
document.topdown.top=pageYOffset
document.topdown.left=e.x+1
}



if (document.all)
document.onmousemove=followmouse1
else if (document.layers){
window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=followmouse2
}










function regenerate(){
window.location.reload()
}
function regenerate2(){
setTimeout("window.onresize=regenerate",400)
}
if ((document.all&&!window.print)||document.layers)
window.onload=regenerate2

</script>

<BR>
<BR>
<script language="javascript" src="timerbar.js">
</script>
</font></b></i>
<p><i>Updated January 2006</i></p>

</BODY>
</HTML>

iknowu99
09-29-2008, 12:22 AM
timebar.js




var loadedcolor='red' ; // PROGRESS BAR COLOR
var unloadedcolor='grey'; // COLOR OF UNLOADED AREA
var bordercolor='white'; // COLOR OF THE BORDER
var barheight=5; // HEIGHT OF PROGRESS BAR IN PIXELS
var barwidth=975; // WIDTH OF THE BAR IN PIXELS
var waitTime=50; // NUMBER OF SECONDS FOR PROGRESSBAR

var action=function()
{
alert("errr, time is up");
window.location="http://www.google.com/";
}

var ns4=(document.layers)?true:false;
var ie4=(document.all)?true:false;
var blocksize=(barwidth-2)/waitTime/10;
var loaded=0;
var PBouter;
var PBdone;
var PBbckgnd;
var Pid=0;
var txt='';
if(ns4){
txt+='<table border=0 cellpadding=0 cellspacing=0><tr><td>';
txt+='<ilayer name="PBouter" visibility="hide" height="'+barheight+'" width="'+barwidth+'" onmouseup="hidebar()">';
txt+='<layer width="'+barwidth+'" height="'+barheight+'" bgcolor="'+bordercolor+'" top="0" left="0"></layer>';
txt+='<layer width="'+(barwidth-2)+'" height="'+(barheight-2)+'" bgcolor="'+unloadedcolor+'" top="1" left="1"></layer>';
txt+='<layer name="PBdone" width="'+(barwidth-2)+'" height="'+(barheight-2)+'" bgcolor="'+loadedcolor+'" top="1" left="1"></layer>';
txt+='</ilayer>';
txt+='</td></tr></table>';
}else{
txt+='<div id="PBouter" onmouseup="hidebar()" style="position:relative; visibility:hidden; background-color:'+bordercolor+'; width:'+barwidth+'px; height:'+barheight+'px;">';
txt+='<div style="position:absolute; top:1px; left:1px; width:'+(barwidth-2)+'px; height:'+(barheight-2)+'px; background-color:'+unloadedcolor+'; font-size:1px;"></div>';
txt+='<div id="PBdone" style="position:absolute; top:1px; left:1px; width:0px; height:'+(barheight-2)+'px; background-color:'+loadedcolor+'; font-size:1px;"></div>';
txt+='</div>';
}

document.write(txt);

function incrCount(){
window.status="Please enter the username and password or choose the link";
loaded++;
if(loaded<0)loaded=0;
if(loaded>=waitTime*10){
clearInterval(Pid);
loaded=waitTime*10;
setTimeout('hidebar()',100);
}
resizeEl(PBdone, 0, blocksize*loaded, barheight-2, 0);
}

function hidebar(){
clearInterval(Pid);
window.status='Goodbye';
//if(ns4)PBouter.visibility="hide";
//else PBouter.style.visibility="hidden";
action();
}


function findlayer(name,doc){
var i,layer;
for(i=0;i<doc.layers.length;i++){
layer=doc.layers[i];
if(layer.name==name)return layer;
if(layer.document.layers.length>0)
if((layer=findlayer(name,layer.document))!=null)
return layer;
}
return null;
}

function progressBarInit(){
PBouter=(ns4)?findlayer('PBouter',document):(ie4)?document.all['PBouter']:document.getElementById('PBouter');
PBdone=(ns4)?PBouter.document.layers['PBdone']:(ie4)?document.all['PBdone']:document.getElementById('PBdone');
resizeEl(PBdone,0,0,barheight-2,0);
if(ns4)PBouter.visibility="show";
else PBouter.style.visibility="visible";
Pid=setInterval('incrCount()',95);
}

function resizeEl(id,t,r,b,l){
if(ns4){
id.clip.left=l;
id.clip.top=t;
id.clip.right=r;
id.clip.bottom=b;
}else id.style.width=r+'px';
}

window.onload=progressBarInit;

iknowu99
09-29-2008, 03:35 PM
boom shakalaka

iknowu99
09-30-2008, 04:21 PM
bump me

Arty Effem
09-30-2008, 05:20 PM
bump meYou're in the wrong forum; try here (http://codingforums.com/forumdisplay.php?f=56).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum