 function doClear(theText) {
     if (theText.value == theText.defaultValue) {
         theText.value = ""
}
}
function setWin(newLoc, newWidth, newHeight) {
newWin = open("",newLoc,"scrollbars=no,resizable=no,status=no,height=" + newHeight + ",width=" + newWidth);
}
function reality(newLoc, newWidth, newHeight) {
newWin = open("",newLoc,"scrollbars=yes,resizable=no,status=no,height=" + newHeight + ",width=" + newWidth);
}

var mydomain="philmfreax.com"

// Automatically open offsite links in new window? (1=yes, 0 will make a checkbox for manual selection)
var auto=1

if (!auto)
document.write('<form name="targetmain"><input type="checkbox" name="targetnew" checked onClick="dynamiclink()">Open off-site links in new window</form>')

function dynamiclink(){

if (auto||(!auto&&document.targetmain.targetnew.checked)){
for (i=0; i<=(document.links.length-1); i++) {
if (document.links[i].hostname.indexOf(mydomain)==-1&&document.links[i].href.indexOf("http:")!=-1)
document.links[i].target="_blank"
}
}
else
for (i=0; i<=(document.links.length-1); i++) {
if (document.links[i].hostname.indexOf(mydomain)==-1)
document.links[i].target=""
}
}

if (auto)
window.onload=dynamiclink
