if (top.location != location) top.location.href = location.href;	// escape from frames

function findASIN() {
	var ASIN = document.Amazon.Dest.value;
	top.location.href = "http://www.amazon.com/exec/obidos/ASIN/" + ASIN + "/ref=nosim/thecompleatcarry";
}

function datetime() {	// display date & time
	var today = new Date();
	var year  = today.getYear();
	if (year < 2000) year += 1900; // Y2K fix
	var month = today.getMonth() + 1;
	var day  = today.getDate();
	var hour = today.getHours();
	var diff = hour - today.getUTCHours();
	var hourdiff = Math.abs(diff);
	var minute = today.getMinutes();
	var minuteUTC = today.getUTCMinutes();
	var minutediff = (minute != minuteUTC) ? ":30" : ":00";
	var second = today.getSeconds();
	if (minute != minuteUTC &&
	  ((minuteUTC < 30 && diff < 0) || (minuteUTC > 30 && diff > 0))) hourdiff--;
	var timezone = ((diff < 0) ? "-" : "+")
	  + ((hourdiff < 10) ? "0" : "") + hourdiff + minutediff;
	if (month <= 9) month = "0" + month;
	if (day <= 9) day = "0" + day;
	if (hour <= 9) hour = "0" + hour;
	if (minute <= 9) minute = "0" + minute;
	if (second <= 9) second = "0" + second;
	var clockview = year + "-" + month + "-" + day
	  + "<IMG SRC='images/xdot.gif' WIDTH=9 HEIGHT=1 BORDER=0 title=''>" + hour + ":" + minute + ":" + second + "<IMG SRC='images/xdot.gif' WIDTH=9 HEIGHT=1 BORDER=0 title=''>UTC" + timezone;
	if (document.all) document.all.clock.innerHTML = clockview;
	  else if (document.getElementById) document.getElementById("clock").innerHTML = clockview;
//	    else document.write(clockview);
}

if (!document.all&&!document.getElementById) datetime();

function updateclock() {
	if (document.all||document.getElementById) setInterval("datetime()",500)
}

function popWinCtr(dis,h,w) {
	x = (screen.width - w) / 2;
	y = (screen.height - h) / 2;
	window.open(dis.href,dis.target,"width=" + w + ",height=" + h + ",left=" + x + ",screenx=" + x + ",top="+ y + ",screeny=" + y + ",z-lock").focus();
	return false;
}

// Simple-Syntax Rollover Script
// Based on "SimpleSwap" by Jehiah Czebotar (jehiah.com/archive/simple-swap)
// Including this script implements image rollovers like:
// <img src="xxx.gif" rsrc="xxx_over.gif">

function SSRoll(el,which) {
    el.src = el.getAttribute(which || "osrc");
}

function SSRollSetup() {
    var x = document.getElementsByTagName("img");
    for (var i=0; i<x.length; i++) {
        var rsrc = x[i].getAttribute("rsrc");
        if (rsrc) { //if rollover source specified...
            // preload image (remove next two lines to disable preloading)
            x[i].rsrc_img = new Image();
            x[i].rsrc_img.src = rsrc;
            // set event handlers
            x[i].onmouseover = new Function("SSRoll(this,'rsrc');");
            x[i].onmouseout = new Function("SSRoll(this);");
            // save original src
            x[i].setAttribute("osrc",x[i].src);
}   }   }

var PreSSRollOnload = window.onload ? window.onload : function(){};
window.onload = function(){PreSSRollOnload(); SSRollSetup();}

