function show_it1(getstyle,color){
	if (color=="orange") getstyle.backgroundColor = "#ffa008";
	if (color=="green") getstyle.backgroundColor = "#cdfe02";
	if (color=="magenta") getstyle.backgroundColor = "#ff08bc";

	getstyle.backgroundImage = "url('/images/corner2-lefttop-"+color+".gif')";
}

function show_it2(getstyle,color) {getstyle.backgroundImage = "url('/images/corner2-righttop-"+color+".gif')";}
function show_it3(getstyle,color) {getstyle.backgroundImage = "url('/images/corner2-leftbottom-"+color+".gif')";}
function show_it4(getstyle,color) {getstyle.backgroundImage = "url('/images/corner2-rightbottom-"+color+".gif')";}
function show_it5(getstyle,color) {getstyle.color = "black";}


function hide_it1(getstyle){
	getstyle.backgroundColor = "black";
	getstyle.backgroundImage = "url('/images/corner2-lefttop-black.gif')";
}

function hide_it2(getstyle) {getstyle.backgroundImage = "url('/images/corner2-righttop-black.gif')";}
function hide_it3(getstyle) {getstyle.backgroundImage = "url('/images/corner2-leftbottom-black.gif')";}
function hide_it4(getstyle) {getstyle.backgroundImage = "url('/images/corner2-rightbottom-black.gif')";}
function hide_it5(getstyle) {getstyle.color = "#c0bfbc";}

function sa(getdiv){
	document.getElementById(getdiv).style.visibility = "visible";
}

function ha(getdiv){
	document.getElementById(getdiv).style.visibility = "hidden";
}

function change(value) {
	var selectedid = document.getElementById("selectedid")
	var usa = document.getElementById("1")
	var canada = document.getElementById("2")
	var rest = document.getElementById("ZZ")

		usa.style.display = 'none';
		canada.style.display = 'none';
		rest.style.display = 'none';

	if ((value=='1')||(selectedid.value=='1')) {
		usa.style.display = 'inline';
	} else if ((value=='2')||(selectedid.value=='2')) {
		canada.style.display = 'inline';
	} else {
		rest.style.display = 'inline';
	};
}

var countit = 0;
function loader() {
        if (countit==0) {
                document.pay.submit();
                countit = 1;
                document.getElementById("myloader").src = document.getElementById("myloader").src;
        }
}

// unhide elements
function hideclick() {
                var unhide1 = document.getElementsByName("preload");

                for(var i=1;i<unhide1.length+1;i++){
			var preload = 'preload' + i;
			var showall = 'showall' + i;
			
			document.getElementById(preload).style.display = "none";
			document.getElementById(showall).style.display = "none";
		}
}

function unhideclick() {
                var unhide1 = document.getElementsByName("preload");

                for(var i=1;i<unhide1.length+1;i++){
			var preload = 'preload' + i;
			var showall = 'showall' + i;
			
			document.getElementById(preload).style.display = "block";
			document.getElementById(showall).style.display = "block";
		}
}
