
//Assign events...
//window.onerror = scriptErrors;

isIE4 = (document.all && !document.getElementById) ? true : false;
isNS4 = (document.layers) ? true : false;
isDOM = (document.getElementById)
var isNav = (navigator.appName == "Netscape") ? true : false;

//var strGlobalURL = "http://dt2000/Alpacalachin/index.asp?H=";
//var strGlobalURL = "http://www.alpacalachin.com/index.asp?H=";

function EmailName(strUser, strDomain, strSuffix, strText){
  if (strText == "")
  {
  	document.write('<a href="' + 'mailto:' + strUser + '@' + strDomain + '.' + strSuffix + '">' + strUser + '@' + strDomain + '.' + strSuffix + '</a>');
  }
  else
  {
  	document.write('<a href="' + 'mailto:' + strUser + '@' + strDomain + '.' + strSuffix + '">' + strText + '</a>');
  }
}

function EmailNameClass(strUser, strDomain, strSuffix, strText, strClass){
  if (strText == "")
  {
  	document.write('<a class = "' + strClass + '" href="' + 'mailto:' + strUser + '@' + strDomain + '.' + strSuffix + '">' + strUser + '@' + strDomain + '.' + strSuffix + '</a>');
  }
  else
  {
  	document.write('<a class = "' + strClass + '" href="' + 'mailto:' + strUser + '@' + strDomain + '.' + strSuffix + '">' + strText + '</a>');
  }
}

function mMouseOut(obj)
{
	obj.style.color="#FFFFF0";
}

function mMouseOver(obj)
{
	obj.style.color="red";
}

function Go(strPage)
{
	parent.frames[2].location.href = strPage;
}

function frameFinder(strPage)
{
//	if (window == top)	{ top.location.href = strGlobalURL + strPage; }
}

function GetNewX()
{
	if (isNav)
	{
	 	spX = (window.innerWidth - 630)/2-15;
	 	spY = 230;
	 }
	else
	{
		spX = (document.body.clientWidth - 630)/2;
		spY = 238;
	}
}

function SetText(obj1, obj2)
{
	obj2.value = obj1.value;
}

function SetObject(obj1, obj2)
{
	if (obj1.checked)	
		obj2.value = "True";
	else
		obj2.value = "False";
}

function SetObjectLC(obj1, obj2)
{
	if (obj1.checked)	
		obj2.value = "true";
	else
		obj2.value = "false";
}

function SetObjectNot(obj1, obj2)
{
	if (obj1.checked)	
		obj2.value = "False";
	else
		obj2.value = "True";
}

function SetIndex(obj1, obj2)
{
	obj2.selectedIndex = obj1.selectedIndex;
}
function ChangeImage(url)
{
	document['imgType'].src = typeof url == 'string' ?	url : url.src;

}
