<!--
//This code contains all the image swap functions.
if (document.images)
{
   offtools = new Image(49 ,18);
   offtools.src = " images/tools-tnav.gif";
   ontools = new Image(63 ,18);
   ontools.src = "images/tools-tnav2.gif";

   offtutorials = new Image(50 ,19);
   offtutorials.src = " images/guides-tnav.gif";
   ontutorials = new Image(50 ,19);
   ontutorials.src = "images/guides-tnav2.gif";

   offtemplates = new Image(51 ,20);
   offtemplates.src = " images/templates-tnav.gif";
   ontemplates = new Image(51 ,20);
   ontemplates.src = "images/templates-tnav2.gif";

   offresources = new Image(52 ,21);
   offresources.src = " images/resources-tnav.gif";
   onresources = new Image(52 ,21);
   onresources.src = "images/resources-tnav2.gif";

   offresume = new Image(52 ,21);
   offresume.src = " images/resume.gif";
   onresume = new Image(52 ,21);
   onresume.src = "images/resume2.gif";

   offcontact = new Image(52 ,21);
   offcontact.src = " images/contact.gif";
   oncontact = new Image(52 ,21);
   oncontact.src = "images/contact2.gif";

   offhome = new Image(52 ,21);
   offhome.src = " images/home-tnavon.gif";
   onhome = new Image(52 ,21);
   onhome.src = "images/home-tnavon2.gif";

   offtoolsleft = new Image(52 ,21);
   offtoolsleft.src = " images/tools-tnavleft.gif";
   ontoolsleft = new Image(52 ,21);
   ontoolsleft.src = "images/tools-tnavleft2.gif";

   offhomeleft = new Image(52 ,21);
   offhomeleft.src = " images/home-tnavonleft.gif";
   onhomeleft = new Image(52 ,21);
   onhomeleft.src = "images/home-tnavonleft2.gif";

   offtutorialsleft = new Image(50 ,19);
   offtutorialsleft.src = " images/guides-tnavleft.gif";
   ontutorialsleft = new Image(50 ,19);
   ontutorialsleft.src = "images/guides-tnavleft2.gif";

   offtemplatesleft = new Image(51 ,20);
   offtemplatesleft.src = " images/templates-tnavleft.gif";
   ontemplatesleft = new Image(51 ,20);
   ontemplatesleft.src = "images/templates-tnavleft2.gif";

   offresourcesleft = new Image(52 ,21);
   offresourcesleft.src = " images/resources-tnavleft.gif";
   onresourcesleft = new Image(52 ,21);
   onresourcesleft.src = "images/resources-tnavleft2.gif";

   offresumeleft = new Image(52 ,21);
   offresumeleft.src = " images/resumeleft.gif";
   onresumeleft = new Image(52 ,21);
   onresumeleft.src = "images/resumeleft2.gif";

   offmenu = new Image(52 ,21);
   offmenu.src = " images/leftmenu.gif";
   onmenu = new Image(52 ,21);
   onmenu.src = "images/leftmenuon.gif";

   offjscode = new Image(53 ,21);
   offjscode.src = " images/rightmenu.gif";
   onjscode = new Image(53 ,21);
   onjscode.src = "images/rightmenuon.gif";

   offjscodeselected = new Image(53 ,21);
   offjscodeselected.src = " images/rightmenuselected.gif";
   onjscodeselected = new Image(53 ,21);
   onjscodeselected.src = "images/rightmenuselectedon.gif";

   offmenuselected = new Image(53 ,21);
   offmenuselected.src = " images/leftmenuselected.gif";
   onmenuselected = new Image(53 ,21);
   onmenuselected.src = "images/leftmenuselectedon.gif";
}


function di(id,action)
{
   if (document.images)
   {
      document.images[id].src=eval(action + id +".src");
   }
}

function di2(id,action)
{
   if (document.images)
   {
      document.images[id].src=eval(action + id +".src");
   }
}

//Image swap functions ends here.


function close_window()
{
    window.close();
}

//All the store/display/erase cookies tab functions are here						
  var expDays= 365;
  var CookieInfoStr='';

  var expdate = new Date();
  var olddate = new Date();
  expdate.setTime (expdate.getTime() + (expDays*24*60*60*1000));
  olddate.setTime (expdate.getTime());
		
function StoreDocumentLink(){
    document.write ('<a href="javascript:addCookieArray(\'' + document.title + '\',\'' + location.href + '\');" class="save">&nbsp;&nbsp;&nbsp;Store this document</a><br>');
}		
function ClearStoredDocumentsLink(){
    document.write ('<a href="javascript:del();" class="save">&nbsp;&nbsp;&nbsp;&nbsp;Clear all documents</a><br>');
}			
function ShowStoredDocumentsLink(){
  var i = 0;
  document.write ('');
  while (getCookie('names' + i) != null) {
   document.write ('&nbsp; <a href="' + getCookie('urls' + i) + '">' + getCookie('names' + i) + '</a><br>' );
   i++; 
  }  
  if (i==0){
   document.write ('No Stored Documents' );
  }
  document.write ('');

}
function getCookie (name) {
var dcookie = document.cookie; 
var cname = name + "=";
var clen = dcookie.length;
var cbegin = 0;
  while (cbegin < clen) {
  var vbegin = cbegin + cname.length;
  if (dcookie.substring(cbegin, vbegin) == cname) { 
    var vend = dcookie.indexOf (";", vbegin);
    if (vend == -1) vend = clen;
    return unescape(dcookie.substring(vbegin, vend));
  }
  cbegin = dcookie.indexOf(" ", cbegin) + 1;
  if (cbegin == 0) break;
  }
return null;
}
function setCookie (name, value, expires) {
if (!expires) expires = new Date();
document.cookie=name+"="+escape (value)+"; expires="+expires.toGMTString()+"; path=/";
}
function setCookieArray(name){
this.length = setCookieArray.arguments.length - 1;
  for (var i = 0; i < this.length; i++) {
  this[i + 1] = setCookieArray.arguments[i + 1];
  setCookie (name + i, this[i + 1], expdate);
  }  
}
function addCookieArray(name, val){
  var i = 0;
  var found=false;
    
  while (getCookie('names' + i) != null) { 
    if (getCookie('names' + i) == name) found=true;
    i++;	
  }    
  
  if (!found) {
  setCookie ('names' + i, name, expdate);
  setCookie ('urls' + i, val, expdate);
  //alert('This page has been added to your stored documents. ');
  location.reload();
  }
  else {
  alert('This page has already been added to your stored documents. ');
  }
  
}

function getCookieArray(name){
var i = 0;
  while (getCookie(name + i) != null) {
  this[i + 1] = getCookie(name + i);
  i++; this.length = i;
  }		
}
function del() {
var i = 0;
if (window.confirm('Clear all stored documents?  ')) {

  while (getCookie('names' + i) != null) {
  setCookie ('names' + i, '', olddate);
  setCookie ('urls' + i, '', olddate);
  i++; 
  }  
  i++; 
  setCookie ('names' + i, '', olddate);
  setCookie ('urls' + i, '', olddate);   
  //alert('Stored documents have been cleared. ');
  location.reload();
}
}
//Ends the store documents section
//Loads status bar clock
function doClock() 
{
    window.setTimeout( "doClock()", 1000);
    today = new Date();
    self.status = today.toString();
}
doClock()
//Ends status bar clock

//Start Site Statistics Check
function technical()
{
domain=window.document.forms.kappa.Whois.value;
newurl='http://www.netcraft.com/cgi-bin/Survey/whats?host=www.'+domain;
return false;
}

function traffical()
{
domain=window.document.forms.kappa.Whois.value;
newurl='http://xslt.alexa.com/data?cli=100&url='+domain;
return false;
}

function archive()
{
domain=window.document.forms.kappa.Whois.value;
newurl='http://web.archive.org/web/*/http://'+domain;
return false;
}

function showit()
{
if (newurl != "")
{
if (typeof DomainLookUpWindow == 'undefined') {} else {DomainLookUpWindow.close()};
DomainLookUpWindow=window.open(newurl,'DomainLookUpWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=450,left=10,top=10');
}
else {alert('DOMAIN NOT FOUND\n\nPlease Check The List Of Supported Domains')};
}

function Go()
{
 if (document.kappa.sub[0].checked) {traffical(); showit();}
 else 
 {
  if (document.kappa.sub[1].checked){technical(); showit();}
  else {archive(); showit();}
 }
}



//End Site statistics Check

//Check Page alignments
function popit(windowname)
{
if (r[0].checked) {x=640; y=480;};
if (r[1].checked) {x=800; y=600;};
if (r[2].checked) {x=1024; y=760;};
if (r[3].checked) {x=1600; y=1200;};
pageurl=lengthurl.value;
if (pageurl.indexOf("://")==-1) {pageurl="http://"+pageurl};
windowstring="toolbar=yes,location=yes,directories=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes,width="+x+",height="+y;
MyNewWindow=window.open(pageurl, windowname,windowstring);
}

//End the ould page alingment test

//Begin Function call for Chrome Window
//   (c) Copyright 2003. Mariano Klein || www.byklein.com    
//         Distributed under the terms of the GNU GPL  
ChromelessWindow = function ()
{
	var a = ChromelessWindow.arguments;
////////////////////////////////////////////////////////////////////PRIVATE PROPERTIES
	var URL = a[0];
	var title = a[1];
	var titlebarImage = a[2];
	var titlebarHeight = a[3];
	var titleFont = a[4];
	var titleSize = a[5];
	var titleColor = a[6];
	var scrollbars = a[7];
	var w = a[8]+(a[14]*2);
	var h = a[9]+a[14]+a[3];
	var centered = a[10];
	var xPos = a[11];
	var yPos = a[12];
	var borderColor = a[13];
	var borderSize = a[14];
	var minimizeButton = a[15];
	var closeButton = a[16];
	this.author = "Mariano Klein";
	this.version = "Uknown";
	
	
	var win = (navigator.appVersion.indexOf("Windows"))?true:false;
	var ie= (navigator.appName == "Microsoft Internet Explorer")?true:false;
	var v = navigator.appVersion;
	var v55 = v.indexOf("MSIE 5.5")?true:false;
	var v60 = v.indexOf("MSIE 6.0")?true:false;
	var chromelessCompatible = null;
	var titlebarContent = null;
	var chromelessWW = null;
////////////////////////////////////////////////////////////////////PUBLIC METHODS
	openChromeless = function(){if(chromelessWW==null || chromelessWW.closed){openParent();setChrome();moveChromeless();setParentSource();}else{chromelessWW.execScript("showChromeless()");}}
	closeChromeless = function(){if(chromelessWW && !chromelessWW.closed)chromelessWW.close();chromelessWW=null}
	minimizeChromeless = function(){if(chromelessWW && !chromelessWW.closed)chromelessWW.execScript("minimizeChromeless()")}
	setURL = function(){URL = arguments[0];if(chromelessWW && !chromelessWW.closed){chromelessWW.execScript("b.all.canvas.URL='"+URL+"'");chromelessWW.execScript("showChromeless()");}}
	moveChromeless= function()
	{
		if (arguments.length == 0)
		{
			if (centered)
			{
				var tempX = w;
				var tempY = h;
				xPos = (screen.availWidth/2)-(tempX/2);
				yPos = (screen.availHeight/2)-(tempY/2);	
			}
		}
		else if(arguments[0]=="center")
		{
			var tempX = w;
			var tempY = h;
			xPos = (screen.availWidth/2)-(tempX/2);
			yPos = (screen.availHeight/2)-(tempY/2);
		}
		else
		{	
			xPos = arguments[0];
			yPos = arguments[1];
			
		}
		if((chromelessWW)&&(arguments.length != 0))
		{
			if(chromelessCompatible)
			{
				chromelessWW.execScript('var cx='+xPos+';');
				chromelessWW.execScript('var cy='+yPos+';');
				chromelessWW.execScript("showChromeless()");
				chromelessWW.execScript("focus()");
			}
			else
			{
				chromelessWW.moveTo(xPos,yPos);
			}
		}
	}
	resizeChromeless = function()
	{
		w = arguments[0];
		h = arguments[1];
		cH = (h-titlebarHeight)-borderSize;
		cW = w -(borderSize*2);
		if(chromelessWW)
		{
			chromelessWW.execScript('var cw='+w+';');
			chromelessWW.execScript('var ch='+h+';');
			chromelessWW.execScript("b.all.canvas.style.width='"+cW+"'");
			chromelessWW.execScript("b.all.canvas.style.height='"+cH+"'");
			chromelessWW.execScript("b.all.closeButton.style.right='"+borderSize+"'");
			chromelessWW.execScript("b.all.minimizeButton.style.right='"+(borderSize+20)+"'");
			chromelessWW.execScript("showChromeless();focus()");
		}
	}
////////////////////////////////////////////////////////////////////PRIVATE METHODS
	openParent = function()
	{
		chromelessCompatible = win && ie && (v55 || v60);
		var sc = (scrollbars)?"yes":"no";
		if (chromelessCompatible)
		{
			chromelessWW = window.open("about:blank","","top=5000,left=5000,width=100,height=100,scrollbars="+sc);
		}
		else
		{	
			chromelessWW = window.open(URL, "chromelessWindow","top="+yPos+",left="+xPos+",width="+w+",height="+(h-20)+",scrollbars="+sc+",resizable=0");
			chromelessWW.document.title = title;
		}	
	}	
	setChrome = function()
	{
		var cH = (h-titlebarHeight)-borderSize;
		var cW = w -(borderSize*2);
		this.c = "<object style='position:absolute;z-index:2;top:"+titlebarHeight+"px;left:"+borderSize+"px;width:"+cW+"px;height:"+cH+"px;' data='"+URL+"' id='canvas'></object>";
	
		if((titlebarImage==undefined)||(titlebarImage==null)||(titlebarImage==""))
		{
			titlebarContent="";
			tb = false;
		}
		else
		{
			titlebarContent="<img id='menu' unselectable='on' src='"+titlebarImage+"' style='position:absolute; top:0px; left:0px;z-index:2'>";
			tb = true;
		}
		menu = "\<div id='Title' unselectable='on' style='font-family:Arial;font-size:11px;font-weight:bold;position:absolute;top:5px;left:"+borderSize+"px;width:70%;height:15px;cursor:default;font-family:"+titleFont+";font-size:"+titleSize+";color:"+titleColor+";z-index:3'>"+title+"</div>\
			<img id='closeButton' unselectable='on' src='"+closeButton+"' width='15' height='15' style='position:absolute; top:5px; right:"+(borderSize)+"px;z-index:3'>\
			"+titlebarContent+"\<img id='minimizeButton' unselectable='on' src='"+minimizeButton+"' width='15' height='15' style='position:absolute; top:5px; right:"+(borderSize+20)+"px;z-index:3'>\
			<div id='fondo' unselectable='on' style='position:absolute; top:0px; left:0px; width:100%; height:100%; background-color:"+borderColor+";z-index:1'></div>";
		
	}	
	setParentSource = function()
	{
		if(chromelessWW)
		{
			chromelessWW.document.open();
			parentSource = '\
			<html>\n\
			<head>\n\
			<META HTTP-EQUIV="imagetoolbar" CONTENT="no">\n\
			<script>\n\
			var idsi = setInterval(objControl,50);\n\
			function objControl(){objContent = b.all("canvas").object;if(objContent!=null){setUpContent();}};\n\
			</script>\n\
			</head>\n\
			<body>\n\
			<script>\n\
			tempOpener = opener;\n\
			opener = self;\n\
			var c=window.createPopup();\n\
			var b=c.document.body;\n\
			var ox=oy=ix=iy=0;\n\
			var allContent =\"<html><head></head><body>'+menu+c+'</body></html>\";\n\
			b.innerHTML=allContent;\n\
			var cx='+xPos+';\n\
			var cy='+yPos+';\n\
			var cw='+w+';\n\
			var ch='+h+';\n\
			window.showChromeless = function(){\n\
			c.show(cx,cy,cw,ch)}\n\
			var mm=false;\n\
			var cmove=b.all("fondo");\n\
			var cmove2=(b.all("menu"))?b.all("menu"):"";\n\
			var ctitle=b.all("Title");\n\
			ctitle.style.visibility=('+tb+')?"hidden":"visible";\n\
			var cclose=b.all("closeButton");\n\
			var cminimize=b.all("minimizeButton");\n\
			self.resizeChromeless = function(){w = arguments[0];h = arguments[1];cH = (h-'+titlebarHeight+')-'+borderSize+';cW = w -('+borderSize+'*2);cw=w;ch=h;b.all.canvas.style.width=cW;b.all.canvas.style.height=cH;b.all.closeButton.style.right='+borderSize+';b.all.minimizeButton.style.right='+(borderSize+20)+';showChromeless();focus()}\n\
			self.moveChromeless = function(){if(arguments[0]=="center"){var tempX = '+w+';var tempY = '+h+';xPos = (screen.availWidth/2)-(tempX/2);yPos = (screen.availHeight/2)-(tempY/2);}else{xPos = arguments[0];yPos = arguments[1];}cx=xPos;cy=yPos;showChromeless();focus()};\n\
			self.setURL = function(){b.all.canvas.URL=arguments[0];showChromeless()};\n\
			self.closeChromeless = function(){opener=self;self.close()};\n\
			self.dragChromeless = function(){m = (arguments[0])?1:0};\n\
			function setUpContent(){\n\
			objContent.parentWindow.resizeChromeless = self.resizeChromeless;\n\
			objContent.parentWindow.moveChromeless = self.moveChromeless;\n\
			objContent.parentWindow.setURL = self.setURL;\n\
			objContent.parentWindow.closeChromeless = self.closeChromeless;\n\
			objContent.parentWindow.dragChromeless = self.dragChromeless;\n\
			};\n\
			cclose.onclick=function(){opener=self;self.close()};\n\
			cminimize.onclick=function(){if(tempOpener&&!tempOpener.closed){tempOpener.window.focus()}else{opener.blur();blur()}};\n\
			var m=ox=oy=ix=iy=0;\n\
			ctitle.onmousedown=cmove.onmousedown=cmove2.onmousedown=function(){m=1};\n\
			ctitle.onmouseup=cmove.onmouseup=cmove2.onmouseup=function(){m=0};\n\
			document.body.onclick=function(){if (m){ focus();cx=ix+event.screenX-ox;cy=iy+event.screenY-oy;c.show(cx,cy,cw,ch) }else {ix=cx; iy=cy; ox=event.screenX; oy=event.screenY } };\n\
			setInterval("document.body.click()",20);\n\
			onfocus=function(){showChromeless();focus()}\n\
			</script>\n\
			</body>\n\
			</html>\n\
			';
			chromelessWW.document.write(parentSource);
			chromelessWW.document.close();
			chromelessWW.document.title = title;
			chromelessWW.focus();
		}
	}
	////////////////////////////
	//     PUBLIC METHODS    ///
	////////////////////////////
	this.openChromeless = openChromeless;
	this.closeChromeless = closeChromeless;
	this.minimizeChromeless = minimizeChromeless;
	this.setURL = setURL;
	this.resizeChromeless = resizeChromeless;
	this.moveChromeless = moveChromeless;
}

function createChromeless()
{
		/////////////////////////////////////////////
		//This are the attributes you can customize//
		/////////////////////////////////////////////
		var B = "ByKlein_Chromeless_Window_Object.htm";        // URL
		var Y = "I'm lost";                     							 // title
		var K = "images/titlebar.gif";            						 // titlebarImage
		var L = 20;                                            // titlebarHeight
		var E = "Arial";                                       // titleFont
		var I = 10;                                            // titleSize
		var N = "#F0F0F0";                                     // titleColor
		var C = false;                                         // scrollbars
		var h = 520;                                           // width (w)   
		var r = 270;                                           // height (h)
		var o = true;                                          // centered
		var m = 10;                                            // xPos
		var e = 10;                                            // yPos
		var l = "#8B0000";                                     // borderColor
		var e_= 1;                                             // borderSize
		var s = "images/minus.gif";            						 // minimizeBottom
		var s_= "images/plus.gif";               						 // closeBottom

		myChromeless = new ChromelessWindow(B,Y,K,L,E,I,N,C,h,r,o,m,e,l,e_,s,s_);
}
createChromeless()

//End function calls for Chrome Window

function changeText(spanName,text)
{
    document.getElementById(spanName).innerHTML=text;
}

//Change the style sheet and store in cookie
var CSS_COOKIE_VAR = "LastCSS";

function changeStyle( oSel )
{    if (sCSS = oSel.value)
    {    setStyle( sCSS );
        var expires = new Date( 2010, 1, 1 ); // long enough :)
        document.cookie = CSS_COOKIE_VAR + "=" + escape( sCSS ) +"; expires=" + expires.toGMTString() + ";" ;
    }
}

function setStyle( sCSS )
{    document.getElementById("external_style").href = sCSS;
}

function loadStyle()
{    aCookie = document.cookie.split(";"); 
    for (i=0; i< aCookie.length; i++)
    {    aName = aCookie[i].split("=");
        if (aName[0] == CSS_COOKIE_VAR )
        {    setStyle( aName[1] );
            document.getElementById("control").value = aName[1];
        }
    }
}

//End change the style sheet and store in cookie

//Highlight and copy a text area
function highlight(elemnt) {
        document.getElementById(elemnt).select();
        document.getElementById(elemnt).focus();
        if (document.all) {
            textRange = document.getElementById(elemnt).createTextRange();
            textRange.execCommand("RemoveFormat");
            textRange.execCommand("Copy");
            alert("The code has been copied! \n Simply paste to wherever you want like you normally would.");
        }
    }
//End Highlight can copy text

//Browser information
function browserinformation()
{
			document.write("<b>BROWSER: <BR></b>")
			document.write(navigator.appName + "<br>")
			document.write("<b>BROWSERVERSION: </b>")
			document.write("5.5" + "<br>")
			document.write("<b>CODE: </b>")
			document.write(navigator.appCodeName + "<br>")
			document.write("<b>PLATFORM: </b>")
			document.write(navigator.platform + "<br>")
			document.write("<b>SCREEN RESOLUTION: </b>");
      			document.write(screen.width + "*");
      			document.write(screen.height + "<br>");
      
      			document.write("<b>AVAILABLE VIEW AREA: </b>");
      			document.write(window.screen.availWidth + "*");
      			document.write(window.screen.availHeight + "<br>");
      
     			document.write("<b>COLOR DEPTH: </b>");
      			document.write(window.screen.colorDepth + "<br>");
}
//End Browser Information

//View Source link (Only works in MSIE)
function viewsource()
{
document.write('<a href="view-source:' + window.location + '" class="source">Source</a>');
}

//Set as homepage image
function makeDefault(element)
{
element.style.behavior='url(#default#homepage)'; 
element.setHomePage('www.HeaphyDesigns.com');
}
//End Set Homepage

//Bottom of page save function
function save_icon()
{
    document.write ('<a href="javascript:addCookieArray(\'' + document.title + '\',\'' + location.href + '\');"><img src="images/icon_save.gif" alt="Save this article" width="26" height="25" border="0"></a>');
}
//End of bottom of page save function
//-->