function Changespans(swap1,swap2)
{
document.getElementById("TempSwap").innerHTML = document.getElementById(swap1).innerHTML;
document.getElementById(swap1).innerHTML = document.getElementById(swap2).innerHTML;
document.getElementById(swap2).innerHTML = document.getElementById("TempSwap").innerHTML;
}
function confirmSubmit()
{
var agree=confirm("Are you sure you wish to continue?");
if (agree)
	return true ;
else
	return false ;
}

function confirmSubmitWithQuestion(Question)
{
var agree=confirm(Question);
if (agree)
	return true ;
else
	return false ;
}

function checkedBoxes(e)
	{
		var sizeOfBoxes = e.length;
		var checkedValue = new String();
		for (var i = 0;i < sizeOfBoxes; i++)
		{
			if (e[i].checked == true)
			{
				if (checkedValue != '')
				{
					checkedValue += ',';
				}
				checkedValue += e[i].value;
			}
		}
		return checkedValue
	}


function OpenAWindow(url,XDim,YDim) {
	if (arguments.length > 1) {
		var width = String(arguments[1]);
		var height = String(arguments[2]);
		if ((loc = width.indexOf("%")) != -1) {
			width = width.slice(0, loc);
			width = Number(width);
			width = screen.width * (width / 100);
		}
		if ((loc = height.indexOf("%")) != -1) {
			height = height.slice(0, loc);
			height = Number(height);
			height = screen.height * (height / 100);
		}
	} else {
		var width = 800;
		var height = 480;
	}
	var LeftPosition = (screen.width) ? (screen.width-XDim)/2 : 0;
	var TopPosition = (screen.height) ? (screen.height-YDim)/2 : 0;
	var attributeString = 'height=' + height + ',width=' + width + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top='+TopPosition+',left='+LeftPosition+'';
	//alert(attributeString);
	var MyWin = window.open(url, 'Scrolls', attributeString);
	MyWin.focus();
}
function OpenAWindowNoScrolls(url,XDim,YDim) {
	if (arguments.length > 1) {
		var width = String(arguments[1]);
		var height = String(arguments[2]);
		if ((loc = width.indexOf("%")) != -1) {
			width = width.slice(0, loc);
			width = Number(width);
			width = screen.width * (width / 100);
		}
		if ((loc = height.indexOf("%")) != -1) {
			height = height.slice(0, loc);
			height = Number(height);
			height = screen.height * (height / 100);
		}
	} else {
		var width = 640;
		var height = 480;
	}
	var LeftPosition = (screen.width) ? (screen.width-XDim)/2 : 0;
	var TopPosition = (screen.height) ? (screen.height-YDim)/2 : 0;
	var attributeString = 'height=' + height + ',width=' + width + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,top='+TopPosition+',left='+LeftPosition+'';
	//alert(attributeString);
	var MyWin = window.open(url, 'NoScrolls', attributeString);
	MyWin.focus();

}
function button_over(ebutton)
	{
	ebutton.style.backgroundColor = "#B5BDD6";
	ebutton.style.borderColor = "darkblue darkblue darkblue darkblue";
	}
function button_out(ebutton)
	{
	ebutton.style.backgroundColor = "threedface";
	ebutton.style.borderColor = "threedface";
	}
function button_down(ebutton)
	{
	ebutton.style.backgroundColor = "#8494B5";
	ebutton.style.borderColor = "darkblue darkblue darkblue darkblue";
	}
function button_up(ebutton)
	{
	ebutton.style.backgroundColor = "#B5BDD6";
	ebutton.style.borderColor = "darkblue darkblue darkblue darkblue";
	ebutton = null; 
	}




var n = navigator, d= document; 
Win = n.platform.indexOf('Win') != -1;
Mac = n.platform.indexOf('Mac') != -1;
MSIE = n.appVersion.indexOf('MSIE') != -1;
MSIE4 = MSIE && n.appVersion.indexOf('4.0') != -1;
NS6 = !MSIE && d.getElementById;
NS = d.layers;
 
function over(imgName, img_src, layerName) {
	layerName=="divContent" && NS?d.divContainer.document[layerName].document[imgName].src=img_src:layerName!=null && NS?d[layerName].document[imgName].src=img_src:d[imgName].src=img_src;
}
 
function out(imgName, img_src, layerName) {
	layerName=="divContent" && NS?d.divContainer.document[layerName].document[imgName].src=img_src:layerName!=null && NS?d[layerName].document[imgName].src=img_src:d[imgName].src=img_src;
}
 
function resizewindow(width, height)
{
	if (document.layers)
	{
		tmp1 = parent.outerWidth - parent.innerWidth;
		tmp2 = parent.outerHeight - parent.innerHeight;
		width -= tmp1;
		height -= tmp2;
	}
	parent.window.resizeTo(width,height);
}

function popWindow(url, width, height) {
	var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no,status=no' );
}
 
 