<!--

//Open offsite links in new window option- By Jessica Hammer
//Heavily modified by Dynamic Drive
//Visit http://www.dynamicdrive.com for this script

//1)Enter your root domain below (All links containing this root will NOT open in new window):
var mydomain="coolstop.com"

//2)Automatically open offsite links in new window? (1=yes, 0 will render a checkbox for manual selection)
var auto=0;

if (!auto)
document.write('<br /><br /><form name="targetmain" action=""><div class="linky_two"><input type="checkbox" name="targetnew" onclick="dynamiclink()"> open offsite links in new window</div><br /></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="_top"
}
}

window.onload=dynamiclink


// --> 

