// Rollover codes
if (document.images) {
	var rollImages = new Array();

	// preloader
	function preloadImage(path){			
		for (var i = 0; i <= arguments.length; i++) {
		rollImages[i] = new Image();
		rollImages[i].src = "images/" + preloadImage.arguments[i];	
		}
	}

	// swap code - down mode
	function changeImageDown(strImageName){
		var tmpImageName = strImageName;
	
		document.images('link' + tmpImageName).src = "images/link" + tmpImageName + "_on.gif";
		//if (strImageName <= 6){
		//	document.images('head' + tmpImageName).src = "images/head" + tmpImageName + "_on.gif";
		//	document.images('leg' + tmpImageName).src = "images/leg" + tmpImageName + "_on.gif";
		//}
	}

	// swap code - up mode
	function changeImageUp(strImageName){
		var tmpImageName = strImageName;
	
		document.images('link' + tmpImageName).src = "images/link" + tmpImageName + "_off.gif";
		//if (strImageName <= 6){
		//	document.images('head' + tmpImageName).src = "images/head" + tmpImageName + "_off.gif";
		//	document.images('leg' + tmpImageName).src = "images/leg" + tmpImageName + "_off.gif";
		//}
	}

	function singerUp(){
		for (var i = 1; i <= 6; i++){
			document.images('head' + i).src = "images/head" + i + "_on.gif";
			document.images('leg' + i).src = "images/leg" + i + "_on.gif";
		}			
	}
	
	function singerDown(){
		for (var i = 1; i <= 6; i++){
			document.images('head' + i).src = "images/head" + i + "_off.gif";
			document.images('leg' + i).src = "images/leg" + i + "_off.gif";
		}				
	}
	
	// initiate preload
	preloadImage('head1_off','head2_off.gif','head3_off.gif','head4_off.gif','head5_off.gif','head6_off.gif');
	preloadImage('leg1_off','leg2_off.gif','leg3_off.gif','leg4_off.gif','leg5_off.gif','leg6_off.gif');

	function openPopUp(strPage, intHeight, intWidth){
		// Local variable declaration
		var tmpPage = strPage;
		var tmpHeight = Number(intHeight);
		var tmpWidth = Number(intWidth);
		var tmpNewPage;
	
		// Opening new page to new pointer and set focus to it
		tmpNewPage = window.open(tmpPage, "","status=no, toolbar=no,scrollbars=no,location=no,menubar=no,height=" + tmpHeight + ",width=" + tmpWidth +",left=100,top=100");
		tmpNewPage.focus();
	}
	
	function add(strItem){
		// local variable declaration
		var tmpItem = strItem
		
		//alert("default.asp?pageid=9&action=add&item=" + tmpItem + "&qty=" + document.frmMain('qty' + tmpItem).value);
		document.location.href = "default.asp?pageid=9&action=add&item=" + tmpItem + "&qty=" + document.frmMain('qty' + tmpItem).value;
	}
}