function flashimg(elm,x) {

	if(x < 1) {
		elm.style.background="url(/wordpress/wp-content/themes/vSlider2/images/slider_up.gif)";
	} else {
		elm.style.background="url(/wordpress/wp-content/themes/vSlider2/images/slider_down_flash.gif)";
	}
}

function hide(x) {
	var this_ref = document.all ? document.all[x] : document.getElementById(x);
	this_ref.style.display="none";
}

function show(x) {
	var this_ref = document.all ? document.all[x] : document.getElementById(x);
	this_ref.style.display="block";
}

function transformit() {
	var xmlhttp=false;
	var url="/common/labelup.php";
	var label=document.transform.elements["label"].value;
	var r=document.transform.elements["r"].value;
	var b=document.transform.elements["b"].value;
	var g=document.transform.elements["g"].value;
	var tr=document.transform.elements["tr"].value;
	var tb=document.transform.elements["tb"].value;
	var tg=document.transform.elements["tg"].value;
	url+="?label=" + label + "&r=" + r + "&g=" + g + "&b=" + b;
	url+="&tr=" + tr + "&tg=" + tg + "&tb=" + tb;

	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	try {
	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	try {
	xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (E) {
	xmlhttp = false;
	}
	}
	@end @*/

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; }
	}

	if (!xmlhttp && window.createRequest) {
		try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; }
	}

	subject_id = 'output_div';
	xmlhttp.open("GET",url, true);
	xmlhttp.onreadystatechange = function() {
		if(xmlhttp.readyState==4) { document.getElementById(subject_id).innerHTML = xmlhttp.responseText; }
	}
	xmlhttp.send(null);
}

function epochit() {
	var xmlhttp=false;
	var url="/cgi-bin/create-epoch.pl";
	var yr=document.epoch.elements["yr"].value;
	var mnth=document.epoch.elements["mnth"].value;
	var day=document.epoch.elements["day"].value;
	var hr=document.epoch.elements["hr"].value;
	var min=document.epoch.elements["min"].value;
	var sec=document.epoch.elements["sec"].value;
	url+="?yr=" + yr + "&mnth=" + mnth + "&day=" + day;
	url+= "&hr=" + hr + "&min=" + min + "&sec=" + sec;

	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	try {
	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	try {
	xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (E) {
	xmlhttp = false;
	}
	}
	@end @*/

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; }
	}

	if (!xmlhttp && window.createRequest) {
		try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; }
	}

	subject_id = 'output_div';
	xmlhttp.open("GET",url, true);
	xmlhttp.onreadystatechange = function() {
		if(xmlhttp.readyState==4) { document.getElementById(subject_id).innerHTML = xmlhttp.responseText; }
	}
	xmlhttp.send(null);
}

function epochtodate() {
	var xmlhttp=false;
	var url="/cgi-bin/show-epoch.pl";
	var epoch=document.shepoch.elements["epoch"].value;
	url+="?epoch=" + epoch;

	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	try {
	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	try {
	xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (E) {
	xmlhttp = false;
	}
	}
	@end @*/

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; }
	}

	if (!xmlhttp && window.createRequest) {
		try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; }
	}

	subject_id = 'output_div';
	xmlhttp.open("GET",url, true);
	xmlhttp.onreadystatechange = function() {
		if(xmlhttp.readyState==4) { document.getElementById(subject_id).innerHTML = xmlhttp.responseText; }
	}
	xmlhttp.send(null);
}
