The code for http://www.downintheflood.com/source/javascript.code.lib.js is displayed.
function clearText(theText) {
if (theText.value == theText.defaultValue)
{
try
{
// Clear the textbox
theText.value = "";
}
catch(error){}
}
}
// usage: onfocus="clearText(this)";
var win=null;
function MyWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=7;mytop=27}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes";win=window.open(mypage,myname,settings);
win.focus();}
// usage: onClick="MyWindow(this.href,'name','1000','650','yes');return false"
function golang(){
var navselectitem = document.International.world.selectedIndex;
if (document.International.world.options[navselectitem].value != "")
parent.location = document.International.world.options[document.International.world.selectedIndex].value,'main';
}
function copyit(theField) {
var tempval=eval("document.codetable.createcodetable");
tempval.focus();
tempval.select();
therange=tempval.createTextRange();
therange.execCommand("Copy");
}
// usage:
// <form name="codetable">
// <div><input class="button" type="button" value="COPY & PASTE" onclick="copyit();" onmouseover="this.className='button2'" onmouseout="this.className='button1'"></div><br>
// <textarea name="createcodetable" readonly="readonly"><?php // some php code; ?></textarea>
// </form>
// code snippet to be used in a select tag to avoid using the submit button:
// onchange="location = this.options[this.selectedIndex].value;"