﻿// ------------------------------------------------------- //
/* 
	All Classes and Functions are here. Feel free to look at it (although its obfuscated) But dont copy it without my permission or without credit to me! 
	Copyright(c)2009, Kevork Aghazarian, All Rights Reserved.
*/
var ROOT_URL = "http://www.kovo.ca/";
var HISTORY_HASH = [];
// ------------------------------------------------------- //
function sendSearch(form){
	var progClassCallSS = new K_Progress();
	var progClassCallSS2 = new K_ProgressTwo();
	new Request.HTML({
		method: 'get',
		link:'chain',
		evalScripts: true,
		evalResponse: true,
		noCache: true,
		method: 'post',
		data: $(form).toQueryString(),
		url: $(form).getProperty('action'),
		onRequest: function(){
			progClassCallSS.callFxChain(); 
			progClassCallSS2.callFxChain(); 
		},
		onSuccess: function(responseText,responseXML){
			$('searchResultsHere').set('html', this.response.text);
			progClassCallSS.clearPeri();
			progClassCallSS2.clearPeri();
		},
		onFailure: function(xhr){
			new K_Error({id: 'ab'+$random(0,1000), type: 'alert', message: '<p>There was a failure while getting your search results. Please make sure your internet connection is active and try again!</p>'});
			progClassCallSS.clearPeri();
			progClassCallSS2.clearPeri();
		},
		onCancel: function(){
			new K_Error({id: 'ab'+$random(0,1000), type: 'alert', message: '<p>There was a cancel event while getting your search results. This was either caused by you or your browser! Please try again.</p>'});
			progClassCallSS.clearPeri();
			progClassCallSS2.clearPeri();
		},
		onException: function(headerName, value){
			new K_Error({id: 'ab'+$random(0,1000), type: 'alert', message: '<p>There was an exception while getting your search results. This was either something going wrong on our part (unlikely) or by your browser. Please try again!</p>'});
			progClassCallSS.clearPeri();
			progClassCallSS2.clearPeri();
		}
	}).send();	
}
// ------------------------------------------------------- //
function makeComment(){
		$('makeAComment').addEvent('submit',function(e){e.stop();tinyMCE.triggerSave();var progClassCall=new K_ProgressTwo();if($$('.newCommentComment')[0].getProperty('value')==""){new K_Error({id:'ab'+$random(0,1000),type:'alert',message:'<p>Please provide a comment!</p>'});}
else{new Request.HTML({method:this.getProperty('method'),data:this.toQueryString(),link:'chain',evalScripts:true,evalResponse:true,noCache:true,url:this.getProperty('action'),onRequest:function(){progClassCall.callFxChain();},onSuccess:function(responseText,responseXML){$('makeACommentRet').set('html',this.response.text);progClassCall.clearPeri();},onFailure:function(xhr){progClassCall.clearPeri();new K_Error({id:'ab'+$random(0,1000),type:'alert',message:'<p>There was a failure while sending your comment. Please make sure your internet connection is active and try again!</p>'});},onCancel:function(){progClassCall.clearPeri();new K_Error({id:'ab'+$random(0,1000),type:'alert',message:'<p>There was a cancel event while sending your comment. This was either caused by you or your browser! Please try again.</p>'});},onException:function(headerName,value){progClassCall.clearPeri();new K_Error({id:'ab'+$random(0,1000),type:'alert',message:'<p>There was an exception while sending your comment. This was either something going wrong on our part (unlikely) or by your browser. Please try again!</p>'});}}).send();}});
}
// ------------------------------------------------------- //
function historyHashCall(){
	var tId = "navHome";
	var toBoldString = (HISTORY_HASH.getCurrentHash().split('.',1)).join();
	if(toBoldString=="index"){tId="navHome"}
	else if(toBoldString=="blog"){tId="navBlog"}
	else if(toBoldString=="programming"){tId="navProgramming"}
	else if(toBoldString=="gaming"){tId="navGaming"}
	else if(toBoldString=="cars"){tId="navCars"}
	else if(toBoldString=="gear"){tId="navGear"}
	else if(toBoldString=="contact"){tId="navContact"}
	if(toBoldString=="" || toBoldString=="index"){var tBS="Home"}
	else{var tBS=toBoldString.capitalize()}
	new K_AjaxRefresh({urlWanted: ROOT_URL+HISTORY_HASH.getCurrentHash(), toBold: tId, pT: tBS});
}
// ------------------------------------------------------- //
function reportABug(){
	if($('reportABugCont')){
		new Fx.Scroll(window).toElement('reportABugCont');
	}
	else{
		var randomN = $random(0,1000);
		var thisHtml = '<div id="reportABugInner">';
				thisHtml+= '<form enctype="multipart/form-data" action="getstuff.php" method="get" id="f'+randomN+'">';
					thisHtml+= '<img src="'+ROOT_URL+'assets/mindmybugs.jpg" alt="mind my bugs!"/><div class="clear"></div><p class="pTag">Thank you for letting me know what exactly went wrong on my website. Use the form below to share your bugged experience!<input type="hidden" name="what" value="sendBugReport"/></p>';
					thisHtml+= '<table>';
						thisHtml+= '<tr>';
							thisHtml+= '<td><p><textarea cols="1" rows="1" name="whatHappened" id="whatHappened"></textarea></p></td>';
						thisHtml+= '</tr>';
						thisHtml+= '<tr>';
							thisHtml+= '<td><p class="pTag textCenter"><input type="image" value="submit" src="'+ROOT_URL+'assets/send.jpg"/> <img src="'+ROOT_URL+'assets/cancel.jpg" class="cursor_pointer" onclick="$(\'reportABugCont\').destroy();"/></p></td>';
						thisHtml+= '</tr>';
					thisHtml+= '</table>';
				thisHtml+= '</form>';
			thisHtml+= '</div>';
		var eleCont = new Element('div',{'id':'reportABugCont','html':thisHtml}).inject(document.body);
		$('f'+randomN).addEvent('submit', function(e) {
			e.stop();
			if($('whatHappened').getProperty('value')!=""){
				var progIt = new K_ProgressTwo();
				this.set('send', {
					 onComplete: function(response){
						$('reportABugCont').destroy();
						new K_Error({id: 'ab'+$random(0,1000), type: 'alert2', message: '<p>Thanks! I got your message and will fix the issue(s) you experienced as soon as possible!</p>'});
						progIt.clearPeri();
					}
				});
				progIt.callFxChain();
				this.send();
			}
			else{
				new K_Error({id: 'ab'+$random(0,1000), type: 'alert', message: '<p>Please provide an explanation first!</p>'});
			}
		});
		new Fx.Scroll(window).toElement('reportABugCont');
	}
}
// ------------------------------------------------------- //
var K_ScanPage = new Class({
	Implements: [Options, Events],
	Binds: ['scanNow','deScan','slideIn'],
	options: {
		cssSelector: '#kNavigation ul li a',
		idToLoadIn: null
	},
	initialize: function(options){
		this.setOptions(options);
	},
	scanNow: function(){
		$$(this.options.cssSelector).removeEvents('click');
		$$(this.options.cssSelector).each(function(el){
			var getHref = el.getProperty('href');
			getHref=getHref.replace("'","");
			var tId =  el.getProperty('id');
			var pTitle = el.getProperty('title');
			el.addEvent('click',function(e){
				e.stop();
				if(this.options.idToLoadIn!=null){
					new K_AjaxRefresh({urlWanted: encodeURI(getHref), id: this.options.idToLoadIn, toBold: tId, pT: pTitle});	
				}
				else{
					new K_AjaxRefresh({urlWanted: encodeURI(getHref), toBold: tId, pT: pTitle});
				}
			}.bind(this));
		}.bind(this));
	},
	deScan: function(){
		$$(this.options.cssSelector).removeEvents('click');
	},
	slideIn: function(){
		if(HISTORY_HASH.getCurrentHash()=="" || ((window.location.href.split("/")[3]).replace('#',''))==HISTORY_HASH.getCurrentHash() || ( ((window.location.href.split("/")[3]).replace('#',''))=="" && HISTORY_HASH.getCurrentHash()=="index.php" )){
			if($('leftColumn')){
				new Fx.Tween('leftColumn', {fps: 60, link: 'chain', transition: 'quad:in:out'}).start('left','0px');
			}
			if($('rightColumn')){
				new Fx.Tween('rightColumn', {fps: 60, link: 'chain', transition: 'quad:in:out'}).start('right','0px');
			}
		}
		else{
			historyHashCall();
		}
	}
});
// ------------------------------------------------------- //
var K_Error = new Class({
	Implements: [Options, Events],
	Binds: ['createCode','closeAlert'],
	options: {
		id: null,
		type: 'alert',
		message: '',
		onUserYes: $empty,
		onUserNo: $empty
	},
	initialize: function(options){
		this.setOptions(options);
		this.createCode();
	},
	createCode: function(){
		this.aBCont = new Element('div',{'id':'c'+this.options.id, 'class':'alertCont'});
		this.aB = new Element('div',{'class':'alertBox','id':this.options.id});
		this.aBTop = new Element('div',{'class':'ssbTop'});
		this.aBMiddle = new Element('div',{'class':'ssbMiddle'});
		if(this.options.type=="alert"){
			this.aBMiddleInner = new Element('div',{
				'class':'ssbInnerMiddle',
				'html':'<img src="'+ROOT_URL+'assets/error.png" class="errorPng"/><div class="innerAlert">'+this.options.message+'</div><div class="clear"></div><img src="'+ROOT_URL+'assets/ok.png" class="cursor_pointer itsOk display_block" id="aOk'+this.options.id+'"/>'
			});
		}
		else if(this.options.type=="alert2"){
			this.aBMiddleInner = new Element('div',{
				'class':'ssbInnerMiddle',
				'html':'<img src="'+ROOT_URL+'assets/goodalert.png" class="errorPng"/><div class="innerAlert">'+this.options.message+'</div><div class="clear"></div><img src="'+ROOT_URL+'assets/ok.png" class="cursor_pointer itsOk display_block" id="aOk'+this.options.id+'"/>'
			});
		}
		this.aBBottom = new Element('div',{'class':'ssbBottom'});
		this.aBCont.inject(document.body);
		this.aB.inject(this.aBCont);
		this.aBTop.inject(this.aB, 'top');
		this.aBMiddle.inject(this.aBTop, 'after');
		this.aBMiddleInner.inject(this.aBMiddle);
		this.aBBottom.inject(this.aB);
		if(this.options.type=="alert" || this.options.type=="alert2"){
			$('aOk'+this.options.id).addEvent('click', this.closeAlert);
		}
		this.getDimensions = this.aB.getSize();
		this.aB.setStyles({'top':'50%','left':'50%','margin-top':-(this.getDimensions.y/2)+'px', 'margin-left':-(this.getDimensions.x/2)+'px'});
	},
	closeAlert: function(){
		
			this.fireEvent('onUserYes');	
	
		this.aB.fade('out');
		(function(){this.aBCont.destroy()}.bind(this)).delay(800);
	}
});
// ------------------------------------------------------- //
var K_Progress = new Class({
	Implements: [Options, Events],
	Binds: ['fxChain','callFxChain','clearPeri'],
	options: {
		id: 'kLoader',
		loaderElements: ['kld1','kld2','kld3']
	},
	initialize: function(options){
		this.setOptions(options);
		this.first = new Fx.Tween(this.options.loaderElements[0], {fps: 60, link: 'chain', transition: 'quad:in:out'});
		this.second = new Fx.Tween(this.options.loaderElements[1], {fps: 60, link: 'chain', transition: 'quad:in:out'});
		this.third = new Fx.Tween(this.options.loaderElements[2], {fps: 60, link: 'chain', transition: 'quad:in:out'});
	},
	fxChain: function(){
		this.first.start('top','-25px').chain(function(){
			this.first.start('top','0')										   
			this.second.start('top','-25px').chain(function(){
				this.second.start('top','0');
				this.third.start('top','-25px').chain(function(){
					this.third.start('top','0');
				}.bind(this));
			}.bind(this));
		}.bind(this));
	},
	callFxChain: function(){
		this.fxChain();
		this.periFXC = this.fxChain.periodical(1500);
	},
	clearPeri: function(){
		$clear(this.periFXC);
		this.first.cancel();
		this.second.cancel();
		this.third.cancel();
		this.first.start('top','0');
		this.second.start('top','0');
		this.third.start('top','0');
	}
});
// ------------------------------------------------------- //
var K_ProgressTwo = new Class({
	Implements: [Options, Events],
	Binds: ['fxChain','callFxChain','clearPeri'],
	options: {
		id: 'kSideProgress',
		loaderElements: ['kld4','kld5','kld6']
	},
	initialize: function(options){
		this.setOptions(options);
		this.first = new Fx.Tween(this.options.loaderElements[0], {fps: 60, link: 'chain', transition: 'quad:in:out'});
		this.second = new Fx.Tween(this.options.loaderElements[1], {fps: 60, link: 'chain', transition: 'quad:in:out'});
		this.third = new Fx.Tween(this.options.loaderElements[2], {fps: 60, link: 'chain', transition: 'quad:in:out'});
	},
	fxChain: function(){
		this.first.start('left','25px').chain(function(){
			this.first.start('left','0')										   
			this.second.start('left','25px').chain(function(){
				this.second.start('left','0');
				this.third.start('left','25px').chain(function(){
					this.third.start('left','0');
				}.bind(this));
			}.bind(this));
		}.bind(this));
	},
	callFxChain: function(){
		$(this.options.id).setStyle('display','block');
		this.fxChain();
		this.periFXC = this.fxChain.periodical(1500);
	},
	clearPeri: function(){
		$clear(this.periFXC);
		this.first.cancel();
		this.second.cancel();
		this.third.cancel();
		this.first.start('left','0');
		this.second.start('left','0');
		this.third.start('left','0').chain(function(){$(this.options.id).setStyle('display','none')}.bind(this));
	}
});
// ------------------------------------------------------- //
var K_AjaxRefresh = new Class({
	Implements: [Options, Events],
	Binds: ['runAjax','slideOut','slideIn'],
	options: {
		id: 'kInnerMiddle',
		onAjaxComplete: null,
		urlWanted: null,
		toBold: null,
		pT: null
	},
	initialize: function(options){
		this.setOptions(options);
		this.progClassCall = new K_Progress();
		this.runAjax();
	},
	slideOut: function(){
		this.getWSS = window.getScrollSize();
		if($('leftColumn')){
			new Fx.Tween('leftColumn', {fps: 60, link: 'chain', transition: 'quad:in:out'}).start('left','-3000px');
		}
		if($('rightColumn')){
			new Fx.Tween('rightColumn', {fps: 60, link: 'chain', transition: 'quad:in:out'}).start('right','-3000px');
		}
	},
	slideIn: function(){
		if($('leftColumn')){
			new Fx.Tween('leftColumn', {fps: 60, link: 'chain', transition: 'quad:in:out'}).start('left','0px');
		}
		if($('rightColumn')){
			new Fx.Tween('rightColumn', {fps: 60, link: 'chain', transition: 'quad:in:out'}).start('right','0px');
		}
	},
	runAjax: function(){
		this.sendRequest = new Request.HTML({
			method: 'get',
			link:'chain',
			evalScripts: true,
			evalResponse: true,
			noCache: true,
			url: this.options.urlWanted,
			onRequest: function(){
				this.progClassCall.callFxChain();
				this.slideOut();
			}.bind(this),
			onSuccess: function(responseText,responseXML){
				$(this.options.id).set('html', this.sendRequest.response.text);
				this.slideIn();
				if(this.options.onAjaxComplete!=null){
					this.fireEvent('onAjaxComplete');
				}
				if(this.options.toBold!=null){
					$$('#kNavigation ul li a').removeClass('beBold');
					$(this.options.toBold).addClass('beBold');
				}
				this.progClassCall.clearPeri.delay(500);
				Cookie.write('docT', this.options.pT);
				HISTORY_HASH.addState(this.options.urlWanted.split('/',4)[3]);
				this.dt=this.options.pT+" |"+((document.title.split('|').splice(1,3)).join("|"));
				document.title=this.dt;
				this.geturl=sc_tracking_url;
				this.geturl=this.geturl.split("&u=");
				this.geturl2=this.geturl[1].split("&java=");
				this.protectedURL=encodeURIComponent(this.options.urlWanted.split('/',4)[3]);
				this.url=this.geturl[0]+"&u="+ROOT_URL+this.protectedURL+"&java="+this.geturl2[1];
				this.img=new Image(0,0);
				this.img.src=this.url;
				pageTracker._trackPageview(this.protectedURL);
			}.bind(this),
			onFailure: function(xhr){
				this.slideIn();
				new K_Error({id: 'ab'+$random(0,1000), type: 'alert', message: '<p>There was a failure while getting the page requested. Please make sure your internet connection is active and try again!</p>'});
				this.progClassCall.clearPeri.delay(500);
			}.bind(this),
			onCancel: function(){
				this.slideIn();
				new K_Error({id: 'ab'+$random(0,1000), type: 'alert', message: '<p>There was a cancel event while getting the page requested. This was either caused by you or your browser! Please try again.</p>'});
				this.progClassCall.clearPeri.delay(500);
			}.bind(this),
			onException: function(headerName, value){
				this.slideIn();
				new K_Error({id: 'ab'+$random(0,1000), type: 'alert', message: '<p>There was an exception while getting the page requested. This was either something going wrong on our part (unlikely) or by your browser. Please try again!</p>'});
				this.progClassCall.clearPeri.delay(500);
			}.bind(this)
		}).send();
	}							  
});
// ------------------------------------------------------- //
var K_Marquee = new Class({
	Implements: [Options, Events],
	Binds: ['feeder','firstFeed'],
	options: {
		id: 'kwWelcome',
		delay: 20000,
		messages: [ROOT_URL+'assets/welcometomywebsite.png',ROOT_URL+'assets/somuchwork.png',ROOT_URL+'assets/thissiteispoweredbyguruenergy.png',ROOT_URL+'assets/thissitelovesmootools.png',ROOT_URL+'assets/ivegotalottosay.png',ROOT_URL+'assets/gamesareawayoflife.png',ROOT_URL+'assets/ilikejsandphpcheckoutmyscripts.png',ROOT_URL+'assets/feelfreetocontactme.png',ROOT_URL+'assets/oneofthoselatenights.png',ROOT_URL+'assets/youreupearly.png',ROOT_URL+'assets/goodmorning.png',ROOT_URL+'assets/isntitlunchtime.png',ROOT_URL+'assets/notoveryet.png',ROOT_URL+'assets/howwasyourday.png',ROOT_URL+'assets/itsgettinglate.png'],
		lastRandom: null
	},
	initialize: function(options){
		this.setOptions(options);
		new Asset.images(this.options.messages);
		this.arrayLength = this.options.messages.length;
		this.firstFeed();
		this.feeder.periodical(this.options.delay);
	},
	firstFeed: function(){
		this.upLate=this.options.messages[this.arrayLength-7];
		this.upEarly=this.options.messages[this.arrayLength-6];
		this.morning=this.options.messages[this.arrayLength-5];
		this.lunch=this.options.messages[this.arrayLength-4];
		this.notOverYet=this.options.messages[this.arrayLength-3];
		this.evening=this.options.messages[this.arrayLength-2];
		this.gettingLate=this.options.messages[this.arrayLength-1];
		this.getD=new Date();
		this.getH=this.getD.get('hr')+'';
		if(this.getD.get('min')<10){
			this.getM='0'+this.getD.get('min');
		}
		else{
			this.getM=this.getD.get('min')+'';	
		}
		this.getT=(this.getH+this.getM).toInt();
		if(this.getT>2330 || this.getT<=400){
			$(this.options.id).set('html','<img src="'+this.upLate+'"/>');
		}
		else if(this.getT>400 && this.getT<=700){
			$(this.options.id).set('html','<img src="'+this.upEarly+'"/>');
		}
		else if(this.getT>700 && this.getT<1130){
			$(this.options.id).set('html','<img src="'+this.morning+'"/>');
		}
		else if(this.getT>=1130 && this.getT<=1330){
			$(this.options.id).set('html','<img src="'+this.lunch+'"/>');
		}
		else if(this.getT>1330 && this.getT<=1830){
			$(this.options.id).set('html','<img src="'+this.notOverYet+'"/>');
		}
		else if(this.getT>1830 && this.getT<=2130){
			$(this.options.id).set('html','<img src="'+this.evening+'"/>');
		}
		else if(this.getT>2130 && this.getT<=2330){
			$(this.options.id).set('html','<img src="'+this.gettingLate+'"/>');
		}
	},
	feeder: function(){
		this.randomN=$random(0,(this.arrayLength-8));
		if(this.randomN!=this.options.lastRandom){
			this.setOptions({lastRandom: this.randomN});
			new Fx.Tween($$('#'+this.options.id+' img')[0], {fps: 60}).start('opacity','0').chain(function(){
				$(this.options.id).set('html','<img src="'+this.options.messages[this.randomN]+'"/>');
			}.bind(this));	
		}
		else{
			this.feeder();
		}
	}
});
// ------------------------------------------------------- //
var K_PlusMinus = new Class({
	Implements: [Options, Events],
	Binds: ['findAndApply'],
	options: {
		id: 'versionHistoryID',
		handles: '.plusMinusC',
		elements: '.plusMinusS'
	},
	initialize: function(options){
		this.setOptions(options);
		if($(this.options.id)){
			this.findAndApply();
		}
	},
	findAndApply: function(){
		$$(this.options.handles).removeEvents('click');
		$$(this.options.handles).each(function(el){
			var getEle = el.getNext(this.options.elements);
			el.set('html', '+ '+el.get('html'));
			if(getEle.getStyle('display')=="block"){
				getEle.setStyle('display','block');
				el.set('html', el.get('html').substr(1));
				el.set('html', '- '+el.get('html'));
			}
			else{
				getEle.setStyle('display','none');
				el.set('html', el.get('html').substr(1));
				el.set('html', '+ '+el.get('html'));
			}
			el.addEvent('click', function(e){
				e.stop();
				if(el.get('html').charAt(0)=="+"){
					getEle.setStyle('display','block');
					el.set('html', el.get('html').substr(1));
					el.set('html', '- '+el.get('html'));
				}
				else{
					getEle.setStyle('display','none');
					el.set('html', el.get('html').substr(1));
					el.set('html', '+ '+el.get('html'));
				}
			}.bind(this));
		}.bind(this));
	}
});
// ------------------------------------------------------- //
var K_AjaxUpdate = new Class({
	Implements: [Options, Events],
	Binds: ['runAjax'],
	options: {
		id: null,
		onAjaxComplete: null,
		urlWanted: null
	},
	initialize: function(options){
		this.setOptions(options);
		this.progClassCall = new K_ProgressTwo();
		this.runAjax();
	},
	runAjax: function(){
		this.sendRequest = new Request.HTML({
			method: 'get',
			link:'chain',
			evalScripts: true,
			evalResponse: true,
			noCache: true,
			url: this.options.urlWanted,
			onRequest: function(){
				this.progClassCall.callFxChain();
			}.bind(this),
			onSuccess: function(responseText,responseXML){
				$(this.options.id).set('html', $(this.options.id).get('html')+this.sendRequest.response.text);
				if(this.options.onAjaxComplete!=null){
					this.fireEvent('onAjaxComplete');
				}
				this.progClassCall.clearPeri.delay(500);
			}.bind(this),
			onFailure: function(xhr){
				new K_Error({id: 'ab'+$random(0,1000), type: 'alert', message: '<p>There was a failure while getting the page requested. Please make sure your internet connection is active and try again!</p>'});
				this.progClassCall.clearPeri.delay(500);
			}.bind(this),
			onCancel: function(){
				new K_Error({id: 'ab'+$random(0,1000), type: 'alert', message: '<p>There was a cancel event while getting the page requested. This was either caused by you or your browser! Please try again.</p>'});
				this.progClassCall.clearPeri.delay(500);
			}.bind(this),
			onException: function(headerName, value){
				new K_Error({id: 'ab'+$random(0,1000), type: 'alert', message: '<p>There was an exception while getting the page requested. This was either something going wrong on our part (unlikely) or by your browser. Please try again!</p>'});
				this.progClassCall.clearPeri.delay(500);
			}.bind(this)
		}).send();
	}							  
});
// ------------------------------------------------------- //
window.addEvent('domready', function(){
	if(Browser.Engine.trident && Browser.Engine.version<5 && Cookie.read("ie6shown")===null){
		var kwHtml = '<div id="kwIE6Cont">';
			kwHtml+= '<img src="'+ROOT_URL+'assets/ie6trash.jpg" class="floatLeft" style="margin-bottom:25px"/> <p>Seems like you\'re using Internet Explorer 6 (or older).</p><br/>';
			kwHtml+= '<p>The browser you are currently using came out no later than 2001. A lot has changed since then and websites today can\'t give you the experience you want/deserve if you are using old, depreciated browsers.</p><br/>';
			kwHtml+= '<p><b>You deserve it!</b> Upgrade to <a href="http://www.microsoft.com/windows/internet-explorer/default.aspx">Internet Explorer 8</a> or better yet, try out <a href="http://www.firefox.com">Firefox</a>. Firefox is a modern, secure browser with a large market share and an amazing feature set!</p><br/>';
			kwHtml+= '<p>If you refuse to upgrade, know that this site (and many other websites on the internet) wont work well on your browser.</p><br/><p style="font-size:14px;text-align:center"><a href="#" onclick="$(\'kwIE6\').destroy();">Continue to my site &gt; &gt;</a></p>';
			kwHtml+= '</div>';
		new Element('div',{'id':'kwIE6','html':kwHtml}).inject(document.body);
		Cookie.write("ie6shown",true);
	}
	HISTORY_HASH = new HistoryManager();
	HISTORY_HASH.addEvent('onHistoryChange', historyHashCall);
	var scanAllLinks = new K_ScanPage();
	var initMarquee = new K_Marquee();
	scanAllLinks.scanNow();
	scanAllLinks.slideIn();
});