var i = 0;
var imgsrc = new Array();
imgsrc[0] = "images/rollover_0.gif";
imgsrc[1] = "images/rollover_1.gif";
imgsrc[2] = "images/rollover_2.gif";
imgsrc[3] = "images/rollover_3.gif";
imgsrc[4] = "images/rollover_4.gif";
imgsrc[5] = "images/rollover_5.gif";

function myrand(x, y) {
  var range = y - x + 1;
  return Math.floor(Math.random() * range) + x;
}


function openzoom(id) {
	zoom = window.open("static/zoom.php?pid="+id,"Zoom","width=560,height=410,left=190,top=200,scrollbars=yes,menubar=yes,location=no");
	zoom.focus();
}

function opendown(id) {
	down = window.open("static/download.php?pid="+id,"Download","width=560,height=410,left=190,top=200,scrollbars=yes,menubar=yes,location=no");
	down.focus();
}

function getnewurl(myurl) {
	window.location.href = myurl;	
}

function linkchange_chan(oid, otype) {

}

function s_linkchange_chan(oid, otype) {

}

function linkchange(oid, otype) {

}


function linkchangeGlos(oid, otype) {
	if (document.getElementById){
		if (otype == "tdin") {
			document.getElementById("td_"+oid).style.backgroundColor = "#cc0000";
			document.getElementById("a_"+oid).style.color = "#ffffff";
		} else if (otype == "tdout") {
			document.getElementById("td_"+oid).style.backgroundColor = "#ffffff";
			document.getElementById("a_"+oid).style.color = "#cc0000";
		} else if (otype == "ain") {
			document.getElementById("td_"+oid).style.backgroundColor = "#cc0000";
			document.getElementById("a_"+oid).style.color = "#ffffff";
		} else if (otype == "aout") {
			document.getElementById("td_"+oid).style.backgroundColor = "#ffffff";
			document.getElementById("a_"+oid).style.color = "#cc0000";		
		}
	}
}

function linkchangeOrdMit(oid, otype) {
	if (document.getElementById){
		if (otype == "tdin") {
			document.getElementById("td_"+oid).style.backgroundColor = "#cc0000";
			document.getElementById("a_"+oid).style.color = "#ffffff";
		} else if (otype == "tdout") {
			document.getElementById("td_"+oid).style.backgroundColor = "#ffffff";
			document.getElementById("a_"+oid).style.color = "#cc0000";
		} else if (otype == "ain") {
			document.getElementById("td_"+oid).style.backgroundColor = "#cc0000";
			document.getElementById("a_"+oid).style.color = "#ffffff";
		} else if (otype == "aout") {
			document.getElementById("td_"+oid).style.backgroundColor = "#ffffff";
			document.getElementById("a_"+oid).style.color = "#cc0000";		
		}
	}
}

function formneed() {
	if ((document.contactA.type_mail.checked == true) && (document.contactA.type_post.checked == true)) {
		document.getElementById("f1").style.color = "#000000";
		document.getElementById("f2").style.color = "#000000";
		document.getElementById("f8").style.color = "#000000";			
		document.getElementById("f6").style.color = "#000000";			
		document.getElementById("f4").style.color = "#000000";			
		document.getElementById("f5").style.color = "#000000";
	} else if (document.contactA.type_mail.checked == true) {
		document.getElementById("f1").style.color = "#000000";
		document.getElementById("f5").style.color = "#000000";
		
		document.getElementById("f2").style.color = "#000000";
		document.getElementById("f8").style.color = "#000000";
	} else if (document.contactA.type_post.checked == true) {
		document.getElementById("f5").style.color = "#000000";
		document.getElementById("f1").style.color = "#000000";
		document.getElementById("f2").style.color = "#000000";
		document.getElementById("f5").style.color = "#000000";
		document.getElementById("f6").style.color = "#000000";
		document.getElementById("f4").style.color = "#000000";
		document.getElementById("f8").style.color = "#aaaaaa";
	} else {
		document.getElementById("f1").style.color = "#000000";
		document.getElementById("f2").style.color = "#000000";
		document.getElementById("f6").style.color = "#aaaaaa";
		document.getElementById("f4").style.color = "#aaaaaa";
		document.getElementById("f8").style.color = "#aaaaaa";
	}
}