function flash (version, filename, name, width, height, wmode, bgcolor, menu, flashvars) {
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+version+"' width='"+width+"' height='"+height+"' id='"+name+"' align='middle'>");
	document.write("<param name='FlashVars' value='"+flashvars+"' />");
	document.write("<param name='allowScriptAccess' value='sameDomain' />");
	document.write("<param name='wmode' value='"+wmode+"' />");
	document.write("<param name='bgcolor' value='"+bgcolor+"' />");
	document.write("<param name='salign' value='lt' />");
	document.write("<param name='movie' value='"+filename+"' /><param name='menu' value='"+menu+"' /><param name='quality' value='high' /><embed src='"+filename+"' wmode='"+wmode+"' menu='"+menu+"' quality='high' FLashVars='"+flashvars+"' salign='lt' width='"+width+"' height='"+height+"' bgcolor='"+bgcolor+"' name='"+name+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}

function QuestionOn(id) {
	for(i=1; i<=25; i++) {
		if(document.getElementById("span"+i)) {
			if(i==id) {
				document.getElementById("span"+i).style.background="#dae8f5";
			} else {
				document.getElementById("span"+i).style.background="#FFFFFF";
			}
		}
	}
}

function TestOn(id) {
	document.getElementById("span"+id).style.background="#dae8f5";
}

function TabOn(id) {
	for(i=1; i<=4; i++) {
		if(i==id) {
			document.getElementById("tab"+i).style.background="#448ccb";
			document.getElementById("tabcnt"+i).style.display="block";
			document.getElementById("lnk"+i).style.color="#ffffff";
		} else {
			document.getElementById("tab"+i).style.background="#FFFFFF";
			document.getElementById("tabcnt"+i).style.display="none";
			document.getElementById("lnk"+i).style.color="#000000";
		}
	}
}

function CheckYes() {
	if(document.confirmf.yes[0].checked || document.confirmf.yes[1].checked) {
		document.confirmf.submit();
	} else {
		alert('Please, confirm or cancel Online Agreement!');
	}
}

function zoom(url, title, w, h) {
	zoomw=window.open("about:blank", "_blank", "scrollbars=1, width="+(w+25)+", height=600");
	zoomw.document.write("<html><head><title>"+title+"</title></head><body style='margin:0px; background:#ffffff;'>");
	zoomw.document.write("<center><table cellpadding='0' cellpading='0' width='100%' height='100%'><td width='100%' height='100%' align='center' valign='middle'>");
	zoomw.document.write("<img src="+url+">");
	zoomw.document.write("</td></tr></table>");
	zoomw.document.write("</center></body></html>");
}

function contact_form(id) {
	var error=0;
	RegEmail = new RegExp("^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$");
	if(!RegEmail.test(document.getElementById(id).email.value)) {
		error=1;
		alert("Please fill in your Email address correctly!");
		document.getElementById(id).email.focus();
		return false;
	}
	RegName = new RegExp("^[a-zA-Z0-9 ]+$");
	if (!RegName.test(document.getElementById(id).name.value)) {
		error=1;
		alert('Please fill in your Full Name!');
		document.getElementById(id).name.focus();
		return false;
	}	
	if (document.getElementById(id).comments.value.length == 0) {
		error=1;
		alert('Please fill in your Comments!');
		document.getElementById(id).comments.focus();
		return false;
    }
	if(error == 0) {
		document.getElementById(id).submit();
	}
}