// JAVASCRIPT COLLECTION BY HI-CORPORATION™
// ----------------------------------------------
// COPYRIGHT (C) 2001-2005 BY HI-CORPORATION™
// ALL RIGHTS RESERVED
// WWW.HI-CORPORATION.COM
// ----------------------------------------------

// NOTE: for this file to work insert into <BODY> tag like this: <body onload="removeBlur(), showDiv()">

// remove blur function - install note: insert into <BODY> onload="removeBlur()"
	function unblur() {
		this.blur();
	}

	function getLinksToBlur() {
		if (!document.getElementById) return
		links = document.getElementsByTagName("a");
		for(i=0; i<links.length; i++) {
			links[i].onfocus = unblur
		}
	}
function removeBlur() {
			// removes the link boxes
			getLinksToBlur();
		}	
		
// PopUP window centered - install note: make href tag = javascript:popUp('your_page.html','popup',200,300,'scrollbars,resizable')
function popUp(file,name,width,height,parameters,align) {
	parameters += ',width='+width+',height='+height
	parameters += ',left='+(screen.availWidth - width)/2
	parameters += ',top='+(screen.availHeight - height)/2
	popup = window.open(file,name,parameters)
	popup.window.focus()
}		


// PRINT DOCUMENT - install note: make href tag = javascript:printit()
<!--

function printit(){
if (window.print) {
    window.print() ;
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";
}
}
//-->


// DEFAULT STATUSBAR STATUS
// defaultStatus ="[ Copyright 2010 Grafikka | All Rights Reserved ]"


// PRATE MODIFIED NOSPAM MAIL SCRIPT 	// javascript:killSpam('morten','grantzau.com')
	function killSpam(user,domain) {
	locationstring = "mailto:" + user + "@" + domain;
	window.location = locationstring;
	}


// Spawn links in new Window (XHTML strict)
function parseLinks() { 
        // make sure the browser supports the object 
        if (document.getElementsByTagName) { 
                // get the links 
                var a = document.getElementsByTagName('a'); 
                
                // loop through each link (negatively for increased performance) 
                for (var i=a.length;i!=0;i--) { 
                
                        // make alias variable to ease fingers 
                        var c = a[i-1]; 
                        
                        // make sure URL has a href 
                        if (!c.href) continue; 
                        
                        if (c.className.indexOf('external') == -1) continue; 
                        
                        // the handler that handles clicking 
                        c.onclick = function() { 
                        
                                // open the window 
                                var win = window.open(this.href); 
                                // if the window doesn't open, continue normally 
                                if (win) return false; 
                        } 
                } 
        } 
} 
window.onload = removeBlur;
window.onload = parseLinks;
