// JavaScript Document // Example: obj = findObj("image1"); function findObj(theObj, theDoc) { var p, i, foundObj; if(!theDoc) theDoc = document; if( (p = theObj.indexOf("?")) > 0 && parent.frames.length) { theDoc = parent.frames[theObj.substring(p+1)].document; theObj = theObj.substring(0,p); } if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj]; for (i=0; !foundObj && i < theDoc.forms.length; i++) foundObj = theDoc.forms[i][theObj]; for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) foundObj = findObj(theObj,theDoc.layers[i].document); if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj); return foundObj; } myWidth = 0; myHeight = 0; bannerX = 0; currentBannerX = 0; timer = null; currentPage = 0; cycle_timer = null; // refresh the size of the window getWindowSize(); currentBannerX = (myWidth/2)-300; currentBannerX = fixWidth(currentBannerX); function fixWidth(w) { tw = Math.round(w/20)*20; return tw; } var ie4 = document.all; var ns4 = document.layers; var ns6 = document.getElementById && !document.all; function getWindowSize() { if( document.width>0 ) { //Non-IE myWidth = document.width; myHeight = document.height; } else if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } if (findObj('bannerhideleft')) { // adjust the transparent areas w=((myWidth/2)-300); /*if (document.height>myHeight && !ie4) ax=8; else ax=0; if (ie4) { w-=4; ax=-8; }*/ if (ns6) { ax=(window.innerWidth-document.width)/2; } else if (ie4) { ax=-8; } else { ax=0; } if (findObj('bannerhideleft').style) { findObj('bannerhideleft').style.width = (w+ax)+"px"; findObj('bannerhideright').style.width = (w-ax)+"px"; } else { findObj('bannerhideleft').width = (w+ax)+"px"; findObj('bannerhideright').width = (w-ax)+"px"; } } } function setBannerImage(num) { currentPage = num; // sets the background image position // of the banner // refresh the size of the window getWindowSize(); tX = bannerX; // get where the banner image should be located in pixels bannerX = (myWidth/2)-300; bannerX = fixWidth(bannerX); // add the banner number times 600 bannerX = bannerX - (num * 600); // set the timer if (bannerX!=tX) { window.clearTimeout(timer); timer = null; timer = window.setTimeout("moveBanner()",10); } } function forceBannerImage(num) { currentPage = num; // sets the background image position // of the banner // refresh the size of the window getWindowSize(); // get where the banner image should be located in pixels bannerX = (myWidth/2)-300; bannerX = fixWidth(bannerX); // add the banner number times 600 bannerX = bannerX - (num * 600); currentBannerX = bannerX; if (findObj('banner').style) { findObj('banner').style.backgroundPosition="" + currentBannerX + "px 0px"; findObj('banner').style.backgroundRepeat="no-repeat"; } else { findObj('banner').backgroundPosition="" + currentBannerX + "px 0px"; findObj('banner').backgroundRepeat="no-repeat"; } } function gotoPage() { if (currentPage==0) location.href="?page=roket3d"; else if (currentPage==1) location.href="?page=docwatcher"; //else if (currentPage==2) // location.href="?page=launch"; else if (currentPage==2) location.href="?page=thing2"; else if (currentPage==3) location.href="http://www.gm-resources.com/"; else if (currentPage==4) location.href="?page=valhalla"; } function moveBanner() { //findObj('bannerInfo').innerHTML="Banner Target: "+bannerX+", Current Banner Location: "+currentBannerX; window.clearTimeout(timer); timer = null; if (currentBannerXbannerX) { currentBannerX += (bannerX - currentBannerX) * .25 //currentBannerX-=20; timer = window.setTimeout("moveBanner()",10); } else if (currentBannerXbannerX-20) { window.clearTimeout(timer); timer = null; currentBannerX=bannerX; } if (findObj('banner').style) { findObj('banner').style.backgroundPosition="" + currentBannerX + "px 0px"; findObj('banner').style.backgroundRepeat="no-repeat"; } else { findObj('banner').backgroundPosition="" + currentBannerX + "px 0px"; findObj('banner').backgroundRepeat="no-repeat"; } } function cycle() { if (currentPage<4) setBannerImage(currentPage+1) else setBannerImage(0) window.clearTimeout(cycle_timer); cycle_timer=null; cycle_timer=window.setTimeout("cycle()",4000); } window.clearTimeout(cycle_timer); cycle_timer=null; cycle_timer=window.setTimeout("cycle()",4000); function disableCycle() { window.clearTimeout(cycle_timer); cycle_timer=null; } function enableCycle() { window.clearTimeout(cycle_timer); cycle_timer=null; cycle_timer=window.setTimeout("cycle()",4000); } window.onresize = moveBanner; function showAboutProcessWatching() { popWin=window.open('','quoteWindow','left=100,top=100,scrollbars=yes,width=450,height=200') popWin.document.open(); popWin.document.write('About Process Watching'); popWin.document.write('

'); popWin.document.write("Some applications know the file you just saved, and constantly use it to read and write data. In the case of these applications (like Soundforge), moving a file while the application is still using it can lead to errors. Process watching allows you to make sure this doesn't happen by specifing the name of the application that should not be running for the rule to take effect. (It also allows you to specify that an application must be running for a rule to take effect as well.)"); popWin.document.write('

Close Window

'); popWin.document.close(); } function requestTakeover(project) { location.href='?page=takeover&project='+project+'&name='+prompt('Enter your full name:')+'&web='+prompt('Enter a web address where we can find previous examples of your work.'); }