// Copyright Ian Grant 2003/2004, unless otherwise specified 

// how many do we have to choose from?
var NUMBER_OF_CAT_ICONS = 6;

var filename;

// set things up to show a random cat image
function InitRandomCat() {
	// write in a link to the stylesheet that'll hide the default image
	//document.write("<link rel=\"stylesheet\" href=\"styles/crabfish_js.css\" type=\"text/css\" media=\"screen\" title=\"crabfishjs\" />");
	document.write("<style type=\"text/css\">");
	document.write("#defaulticon {");
	document.write("display:none;");
	document.write("visibility:hidden;");
	document.write("}");
	document.write("</style>");

	// get a random filename
	filename = "cat" + getRandomNumber(NUMBER_OF_CAT_ICONS) + ".gif";
}

// and show the random cat
function DoRandomCat() {
	// write it into the document - note the check, to create the right full url on 192.168.0.2 and on the remote server and on cd
	if (location.hostname.indexOf("www.crabfish.com") >= 0) {
		document.write ('<img src="http://' + location.host + '/common/images/' + filename + '" alt="Crabfish icon" width="125" height="78" />');
	} else if (location.hostname.indexOf("192.168.0.") >= 0) {
		document.write ('<img src="http://' + location.host + '/crabfish/common/images/' + filename + '" alt="Crabfish icon" width="125" height="78" />');
	} else {
		document.write ('<img src="images/' + filename + '" alt="Crabfish icon" width="125" height="78" />');
	}
}

// set things up
InitRandomCat();

function showVATPostageRates() {
	i=0;
	while (document.getElementById('vatpostagerates' + i)) {
		toggleObject('vatpostagerates' + i);
		toggleObject('vatpostagecosts' + i);
		
		i++;
	}
}


