function autoSwapImg() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].className.match(".*autoSwapImg")){
				if(images[i].getAttribute("src").match("_off.")){
					images[i].onmouseover = function() {
						this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
					}
					images[i].onmouseout = function() {
						this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
					}
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", autoSwapImg, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", autoSwapImg);
}


function SubmitPage( type ){ 
	document.forms[0].action.value = type;
	document.forms[0].submit();
}

function Confirmpage(){
	alert('ddd');
	return false;
}

function getCookie( key, tmp1, tmp2, xx1, xx2, xx3 )
{
    tmp1 = " " + document.cookie + ";";
    xx1 = xx2 = 0;
    len = tmp1.length;
    while (xx1 < len) 
    {
        xx2 = tmp1.indexOf(";", xx1);
        tmp2 = tmp1.substring(xx1 + 1, xx2);
        xx3 = tmp2.indexOf("=");
        if (tmp2.substring(0, xx3) == key) 
        {
            return(unescape(tmp2.substring(xx3 + 1, xx2 - xx1 - 1)));
        }
        xx1 = xx2 + 1;
    }
    return("");
}
