var readmore;

var router = {
	1 : "go.php?page=more&pid=",
	2 : "go.php?page=artist&pid=",
	3 : "go.php?page=people&pid=",
	4 : "go.php?page=subject&pid=",
	5 : "go.php?page=publication&pid=",
	6 : "go.php?page=uv",
	7 : "go.php?page=detail_popup&pid="	,
	8 : "go.php?page=mystyledetail&mid="	
}

var winfeatures = {
	8: "scrollbars=yes,resizable=yes,width=810,height=600"
}

function popup(which,pid){
	var new_url = router[which]+(pid ? pid:"");
	if (winfeatures[which]){
		readmore = window.open(new_url,"readmore",winfeatures[which]);
	} else {
		readmore = window.open(new_url,"readmore","scrollbars=yes,resizable=yes,width=600,height=600");
	}
	readmore.focus();
}


function verifyPassword(one,two){
	one = document.getElementById(one);
	two = document.getElementById(two);
	if (one.value != two.value){
		alert ("Your password entries do not match -- please try again");
		one.value = "";
		two.value = "";
		one.focus();
	}
}


function defaultOnload(){
	// if there's a function named ready, run it
	try {
		ready();
	} catch (e){
	
	}
}

// jquery rollovers for new utility buttons

$(function(){
	jQuery.ifixpng('/images/blank.gif');
	jQuery('img').ifixpng();

	$("input#submit2").hover(
		function(){
			$(this).attr("src","includes/templates/classic/buttons/english/button_add_selected_over.gif");
		},
		function(){
			$(this).attr("src","includes/templates/classic/buttons/english/button_add_selected.gif");		
		}
	);

	$("input#submit1").hover(
		function(){
			$(this).attr("src","includes/templates/classic/buttons/english/button_add_selected_over.gif");
		},
		function(){
			$(this).attr("src","includes/templates/classic/buttons/english/button_add_selected.gif");		
		}
	);	

	$("a#checkout_link img").hover(
		function(){
			$(this).attr("src","includes/templates/classic/buttons/english/button_checkout_over.gif");
		},
		function(){
			$(this).attr("src","includes/templates/classic/buttons/english/button_checkout.gif");		
		}
	);	

	$("input#add_to_cart_button").hover(
		function(){
			$(this).attr("src","includes/templates/classic/buttons/english/button_in_cart_over.gif");
		},
		function(){
			$(this).attr("src","includes/templates/classic/buttons/english/button_in_cart.gif");		
		}
	);	

	$("img#button_continue_shopping").hover(
		function(){
			$(this).attr("src","includes/templates/classic/buttons/english/button_continue_shopping_over.gif");
		},
		function(){
			$(this).attr("src","includes/templates/classic/buttons/english/button_continue_shopping.gif");		
		}
	);	




});