var useimages=new Array(); // the navigation images

function navswap(theimage,theindex,thestate) {
	// update the image
	document.images[theimage].src = useimages[theindex][thestate].src ;
	// update the pointer
	document.images[theimage + "arrow"].src="images/arrow" + ((thestate==1) ? "on" : "off") + ".gif";
}

function preloadimages() {
//	var navimages=new Array("welcome","thegirls","theclub","booknow","specialoffers","parties","prices","contact","merchandise","classes");
	for(n=1;n<=navimages.length;n++) {
		useimages[n]=new Array();
		useimages[n][0]=new Image();
		useimages[n][1]=new Image();		
		useimages[n][0].src="headers/" + navimages[n-1] + "0.png";
		useimages[n][1].src="headers/" + navimages[n-1] + "1.png";
	}
	return true;
}
function preview(mediaid,itemid) {
        var w=window.open("bigimage.php?id=" + mediaid + "&itemid=" + itemid,"preview","location=0,status=0,scrolling=yes, scrollbars=1,toolbars=0,toolbar=0, height=580, width=400");
        w.focus();
}
function cscode() {
        var w=window.open("cscode.html","cscode","location=0,status=0,scrolling=no, scrollbars=0,toolbars=0,toolbar=0, height=200, width=300");
        w.focus();
}
function dovid(theid) {
	var w = window.open("video/index.php?id=" + theid,"pussycat_tv","location=0, status=0, scrolling=auto, toolbars=0, resizable=no, height=200, width=300");
	w.focus();
}
var w;
function vid(force) {
	if((!w)||force) w = window.open("video/cycle.php","pussycat_tv","location=0, status=0, scrolling=auto, toolbars=0, resizable=no, height=200, width=300");
	w.focus();
	if((!w)||force) w.moveTo(0,0);
}
