function externalLinks() { 
	if (!document.getElementsByTagName) return; 
	var anchors = document.getElementsByTagName("a"); 
	for (var i=0; i<anchors.length; i++) { 
		var anchor = anchors[i]; 
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank"; 
	} 
} 
window.onload = externalLinks;


function open_pop(theURL,winName,w,h,scroll,resize) { //v2.0
	var winl = (screen.width - w) / 2 ;
	var wint = (screen.height - h) / 2 - 30;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resize+''
	win=window.open(theURL,winName,winprops);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function addbookmark(){
// Adds current page to the bookmarks for Internet Explorer only
	if(window.external){
		var bookmarkurl = location.href;
		var bookmarktitle = document.title;
		window.external.AddFavorite(bookmarkurl, bookmarktitle);
		alert("Site Bookmarked!");
	}else{
		alert("Sorry, this feature only works with Internet Explorer.\n" + 
					"Please bookmark this page using your browser's built-in controls.");
	}
}

function clickthrough(url) {
	window.open('/sendtoafriend.php?url='+url+'','Friend','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=360,height=330,top=0,left=0')
}

function confirming(url,message) {
var confirmation=confirm(message); 
 if (confirmation) {
 window.location.href=url;
 } 
}

function tron(imgName)
   {
    if (document.images)
     {
      imgOn=eval(imgName + "on.src");
      document[imgName].src= imgOn;
     }
   }

// MOUSEOUT SWAPIMAGE
function troff(imgName)
 {
   if (document.images)
    {
      imgOff=eval(imgName + "off.src");
      document[imgName].src= imgOff;
    }
 }

