
//attaches the gnome to the bottom right corner and holds it through scrolls and resize
function gmove(){
	x = document.body.scrollTop;
	y = document.body.scrollLeft;
	document.getElementById('gnome').style.top = (0-gnome.offsetHeight+(document.body.clientHeight)+x)+"px"
	document.gnome.style.left = (0-gnome.offsetWidth+(document.body.clientWidth)+y)+"px";
}

// moves the gnome from the bottom left to the bottom right of the window
function gpanLR() {
	start = document.all.gnome.style;
	current = parseInt(start.left);
	ease = current/23;
	finish = document.body.clientWidth-gnome.offsetWidth;
	if(current < finish){
		if((current+45-ease) > finish){
			current += finish - current
			}else{
				current += (45-ease);
			}
		start.left = current+"px";
		setTimeout("gpanLR()", 50);
	}
}

//returns a variable containg the link label
function getinfo(a){
	document.gnome.SetVariable("_root.tt", a);
	}

	
// Check to see if form fields have appropriate info
function CheckRequiredFields() {
var errormessage = new String();
// Put field checks below this point.
if(WithoutContent(document.regform.char_name.value))
	{ errormessage += "\n\nCharacter name is required for registration."; }
if(WithoutContent(document.regform.char_class.value))
	{ errormessage += "\n\nPlease select your class to continue."; }
if(WithoutContent(document.regform.email.value))
	{ errormessage += "\n\nA contact email is required for registration."; }
if(WithoutCheck(document.regform.mount))
	{ errormessage += "\n\nAll new member must own a basic mount."; }	
// Put field checks above this point.
if(errormessage.length > 2) {
	alert('NOTE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()
function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}
function WithoutCheck(ss) {
if(ss.checked) { return false; }
return true;
}
function WithoutSelectionValue(ss){
	for(var i = 0; i < ss.length; i++){
		if(ss[i].selected){
			if(ss[i].value.length){ 
			return false; 
			}
		}
	}
return true;
}

//redircet
function redirect(a){
window.location=a;
}


//Activex write functions
function titlewrite(){
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"500\" height=\"400\"><param name=\"movie\" value=\"swf/title3.swf\"><param name=quality value=high><param name=Wmode value =\"transparent\"><embed src=\"swf/title3.swf\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"500\" height=\"400\"></embed></object>");
}
function gnomewrite(){
document.write("<object id=\"gnome\" style=\"position: absolute;bottom: 0px;left: -370px;z-index: -1;\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"500\" height=\"120\"><param name=\"movie\" value=\"swf/gnome.swf\"><param name=\"quality\" value=\"high\"><param name=\"Wmode\" value=\"transparent\"><embed name=\"gnome\" swLiveConnect=\"true\" Wmode=\"transparent\" src=\"swf/gnome.swf\" loop=\"true\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"500\" height=\"120\"></embed></object>")
}
function anchorwrite(){
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"500\" height=\"400\"><param name=\"movie\" value=\"swf/anchor.swf\"><param name=quality value=high><param name=\"Wmode\" value=\"transparent\"><embed src=\"swf/anchor.swf\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"500\" height=\"400\"></embed></object>")
}