function mouseOverMenu(item) {
    for (i=1; i<=3; ++i) {
	var e = document.getElementById(item+i);
	if (e) {
	    e.style.backgroundColor = "#f14a00";
	    if (i==1) e.style.backgroundImage = "url(/images/cornermenuhover_left.gif)";
	    if (i==3) e.style.backgroundImage = "url(/images/cornermenuhover_right.gif)";
	}
    }
}

function mouseOutMenu(item) {
    for (i=1; i<=3; ++i) {
	var e = document.getElementById(item+i);
	if (e) {
	    e.style.backgroundColor = "transparent";
	    if (i==1) e.style.backgroundImage = "none";
	    if (i==3) e.style.backgroundImage = "none";
	 }
    }
}

function maillink(name2,part2,name1,part1)
{
    document.write('<a href="mail' + 'to:' + (part1 + part2).replace(/\[at\]/g, "@") + '" title="' + (part1 + part2).replace(/\[at\]/, "@") + '">' + (name1 + name2).replace(/\[at\]/, "@") + '<'+'/a>');
}

function rate() {
	expand("rate", 0, 425);
}

expanded = new Array();

function expand(id, height, max) {
	var e = document.getElementById(id);
	if (expanded[id] != 1 && height < max) {
		height+=1+(max-height)/2;
		e.style.height = height + "px";
		setTimeout("expand('" + id + "'," + height + "," + max + ")",100);
	} else {
	    e.style.height = "auto";
	    expanded[id] = 1;
	}
}
	
function ratehover(type,rate) {
	for (i=1; i<=5; ++i) {
		e = document.getElementById("rate_" + type + "_" + i);
		e.src = rate >= i ? '/images/icons/star_yellow.gif' : '/images/icons/star_grey.gif';
	}
}

function setRate(rate) {
    document.forms.rate.rate.value = rate;
    document.forms.rate.submit();
}

function rateunhover(type) {
	for (i=1; i<=5; ++i) {
		e = document.getElementById("rate_" + type + "_" + i);
		e.src = '/images/icons/star_grey.gif';
	}
}

function sure(message, link) {
    if (confirm(message)) location.href = link;
}

function activateInput(input) {
    var inputs = document.getElementsByTagName ('input');
    for (i=0; i<inputs.length; ++i) {
	if (inputs[i].name == input) {
	    inputs[i].focus();
	    return;
	}
    }
}

function hide(id) {
	e = document.getElementById(id);
	e.style.display = "none";
}


