/* Kane Computer - Image Previewer - JavaScript file */

/*
Highlight Image Script II-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

function borderit(which,color)
	{
	//if IE 4+ or NS 6+
	if (document.all||document.getElementById)
		{
		which.style.borderColor=color
		}
	}


/****************************************************
*	        DOM Image rollover:
*		by Chris Poole
*		http://chrispoole.com
*               Script featured on http://www.dynamicdrive.com
*		Keep this notice intact to use it :-)
****************************************************/

function init() {
  if (!document.getElementById) return
  var imgOriginSrc;
  var imgTemp = new Array();
  var imgarr = document.getElementsByTagName('img');
  for (var i = 0; i < imgarr.length; i++) {
    if (imgarr[i].getAttribute('hsrc')) {
        imgTemp[i] = new Image();
        imgTemp[i].src = imgarr[i].getAttribute('hsrc');
        imgarr[i].onmouseover = function() {
            imgOriginSrc = this.getAttribute('src');
            this.setAttribute('src',this.getAttribute('hsrc'))
        }
        imgarr[i].onmouseout = function() {
            this.setAttribute('src',imgOriginSrc)
        }
    }
  }
}
onload=init;



/* for print gallery
Rollover effect on different image script-
By JavaScript Kit (http://javascriptkit.com)
Over 200+ free scripts here!
*/

function changeimage(towhat,url){
if (document.images){
	document.images.targetimage.src=towhat.src
	var Lst
	var title
	title = towhat.src
	Lst=title.lastIndexOf("/") 
	title = title.substr(Lst+1)
	Lst=title.lastIndexOf(".")
	title = title.substr(0,Lst)
	Lst=title.indexOf("_")
	title = title.substr(Lst+1)
	
	title = title.replace(/%20/g," ")
	
	title = title.replace(/-/g," ")
	
	box.title.value = title;
	gotolink=url
	}
}
function warp(){
window.location=gotolink
}


