iH = 518;
dH = 80;
T = 0;
timer = null;
var move = "up";
isIE = (navigator.userAgent.indexOf("MSIE") > -1)? true:false; //(navigator.userAgent.indexOf("Netscape") > -1)? "NN":"MF";
var PN = (isIE)? "parentElement":"parentNode";
var CN = (isIE)? "children":"childNodes";
document.onmouseover = showStatus;
document.onunload = eval("showLoadPage()");
document.oncontextmenu = new Function("return false");
if (top.location.pathname.toString().toLowerCase() != "/" && top.location.pathname.toString().toLowerCase() != "/cm.htm" && top.location.pathname.toString().toLowerCase().indexOf("/cmnew/models.asp") == -1) {
	
	if (top.location.host == "localhost" || top.location.host == "127.0.0.1") {
		//top.location.href = "http://localhost/cm.htm?fle=" + top.location.pathname;
		top.location.href = "http://localhost/cm.htm?fle=" + getPage();
	}
	else {
		//top.location.href = "http://www.craigsminis.com/cm.htm?fle=" + top.location.pathname;
		top.location.href = "http://www.craigsminis.com/cm.htm?fle=" + getPage();
	}
}
function getPage() {
	h = location.href.toString();
	srch = "http://" + location.host;
	return h.substring(srch.length);
}
function showLoadPage() {
	if (top.location.href.toString().toLowerCase().indexOf("cm.htm") > -1 || top.location.href.toString().toLowerCase() == "http://www.craigsminis.com/" || top.location.href.toString().toLowerCase() == "http://www.craigsminis.com") {
		window.open("loading.htm","foot","target=foot");
		//top.frames["foot"].src = "loading.htm";
	}
}
function showStatus(evnt) {
	tag = (isIE)? event.srcElement.tagName:evnt.target.nodeName;
	tar = (isIE)? event.srcElement:evnt.target;
	top.status = (tag == "A")? tar.innerHTML:(tag == "IMG" || tag == "INPUT")? tar.title:"";
	return true;
}
function wd(str) {
	document.getElementById("debugger").innerHTML = (str + "<br>" + document.getElementById("debugger").innerHTML);
}
function mover(ob) {
	if (ob.className.indexOf("Act") == -1) {
		ob.style.filter = "Alpha(Opacity=100, Style=0);";
	}
}
function mout(ob) {
	if (ob.className.indexOf("Act") == -1) {
		ob.style.filter = "Alpha(Opacity=70, Style=0);";
	}
}
function moverTL (yr) {
	document.getElementById("yrDisp").innerHTML = "Click to view the Mini production history for " + yr;
}
function moutTL (td) {
	td.style.backgroundColor = "midnightblue";
}
function showActiveLink() {
	window.open("sponsorTD.asp","rightBar","target=rightBar");
	window.open("googleSearch.asp","bottomBar","target=bottomBar");
	try {
		loc = location.href.toString();
		fldr = "http://" + location.host + "/CMNew/";
		fle = loc.substring(fldr.length);
		mnuTD = top.frames["menu"].document.getElementById("mnu");
		mnuTbl = mnuTD[CN][0];
		for (i=0; i<mnuTbl.rows.length; i++) {
			if (mnuTbl.rows[i].cells[0][CN][1].tagName == "A") {
				refH = mnuTbl.rows[i].cells[0][CN][1].href;
				refF = refH.substring(fldr.length);
				if (fle.indexOf(refF) > -1) {
					mnuTbl.rows[i].cells[0][CN][1][CN][0].className = "tsmiAct";
					mnuTbl.rows[i].cells[0][CN][0].className = "miAct";
					//mnuTbl.rows[i].cells[0][CN][0].innerHTML = "#";
					//break;
				}
				else {
					mnuTbl.rows[i].cells[0][CN][1][CN][0].className = "tsmi";
					mnuTbl.rows[i].cells[0][CN][0].className = "miOn";
				}
			}
		}
	}
	catch (error) {}
}
function addFav() {
	if (window.sidebar && window.sidebar.addPanel) {
		window.sidebar.addPanel(this.title, this.href, '');
	} 
	else if(window.external && (navigator.platform == 'Win32' || (window.ScriptEngine && ScriptEngine().indexOf('InScript') + 1))) {
		window.external.AddFavorite("http://www.craigsminis.com/", "Craig's Minis");
	} 
	else if (window.opera && window.print) {
		return true;
	} 
	else if (document.layers) {
		window.alert('Please click OK then press Ctrl+D to create a bookmark');
	} 
	else {
		window.alert('Please use your browser\'s bookmarking facility to create a bookmark');
	}
}			

