function detailsWin(iFile,x,y) {
	var imagewindow=window.open(""+iFile+"","Details","width="+x+",height="+y+",menubar=no,toolbar=no,scrollbars=yes,resizable");
	imagewindow.resizeTo(x,y);
	imagewindow.focus();
}
function roll(state,imagename){ 
	document.images[imagename].src="/images/"+imagename+"_"+state+".gif"; 
}
function roll2(at,state,imagename){ 
	document.images[at].src="/images/"+imagename+"_"+state+".gif"; 
}
var isDHTML=0;
var isLayers=0;
var isAll=0;
var isID=0;
if(document.getElementById){
	isID=1;isDHTML=1;
}else{
	if(document.all){isAll=1;isDHTML=1;
	}else{
		browserVersion = parseInt(navigator.appVersion);
		if((navigator.appName.indexOf('Netscape')!=-1)&&(browserVersion==4)){isLayers=1;isDHTML=1;}
	}
}
function findDOM(objectID,withStyle){
	if(withStyle==1){
		if(isID){return(document.getElementById(objectID).style);}
		else{if(isAll){return(document.all[objectID].style);}
		else{if(isLayers){return(document.layers[objectID]);}
		};}
	}else{
		if(isID){return(document.getElementById(objectID));}
		else{if(isAll){return(document.all[objectID]);}
		else{if(isLayers){return(document.layers[objectID]);}
		};}
	}
}
function changeStyle(objectID,styleName,newValue){
	var dom=findDOM(objectID,1);
	if(dom){dom[styleName]=newValue;}
}
function setClass(objectID,newClass){
	var dom=findDOM(objectID,0);
	if(dom){dom.className=newClass;}
}
// Sneaky Email Function
function sef(domain,name){
	parent.location='m'+'ai'+'lto:'+name+'@'+domain;
}

function delay(r,g,b,element) {
	setTimeout("fadetext("+r+","+g+","+b+",'"+element+"'),2000");
}
function fadetext(r,g,b,element){
var rdone=false;
var bdone=false;
var gdone=false;
if(g<198){g+=2;}else{g=198;gdone=true;
	if(b>63){b-=2}else{b=63;bdone=true;
		if(r<141){r+=2;}else{r=141;rdone=true;}
	}
}
	document.getElementById(element).style.borderColor="rgb("+r+","+g+","+b+")";
	document.getElementById(element).style.color="rgb("+r+","+g+","+b+")";
	if(rdone==true && bdone==true && gdone==true){
		return;
	}else{
		setTimeout("fadetext("+r+","+g+","+b+",'"+element+"'),500");
	}
}

function contactSubmit(){
	if(document.contact.firstname.value=='') { 
		alert('Some required information was missing from the form.\n\nPlease include your First Name.');
		document.contact.firstname.focus();
		return false;
	}
	if(document.contact.lastname.value=='') { 
		alert('Some required information was missing from the form.\n\nPlease include your Last Name.');
		document.contact.lastname.focus();
		return false;
	}
	if(document.contact.email.value=='') { 
		alert('Some required information was missing from the form.\n\nPlease include your Email Address.');
		document.contact.email.focus();
		return false;
	}
	AtPos=document.contact.email.value.indexOf("@");
	StopPos=document.contact.email.value.lastIndexOf(".");
	if (AtPos==-1 || StopPos==-1){
		alert('Some required information was incorectly entered into the form.\n\nPlease verify your Email Address.');
		document.contact.email.focus();
		return false;
	}
	if(StopPos<AtPos){
		alert('Some required information was incorectly entered into the form.\n\nPlease verify your Email Address.');
		document.contact.email.focus();
		return false;
	}
	if(StopPos-AtPos==2){
		alert('Some required information was incorectly entered into the form.\n\nPlease verify your Email Address.');
		document.contact.email.focus();
		return false;
	}
	if(AtPos==0 || StopPos==0){
		alert('Some required information was incorectly entered into the form.\n\nPlease verify your Email Address.');
		document.contact.email.focus();
		return false;
	}
	if(StopPos==document.contact.email.value.length-1){
		alert('Some required information was incorectly entered into the form.\n\nPlease verify your Email Address.');
		document.contact.email.focus();
		return false;
	}
	if(document.contact.image.value=='') { 
		alert('Some required information was missing from the form.\n\nPlease type in the Image Verification.');
		document.contact.image.focus();
		return false;
	}
	document.contact.submit();
}
var descTop=0;
var descLeft=0;
var domDesc=null;
var oldDomDesc=null;
var t=0;
var lDelay=10;
var lCount=0;
var pause=50;
function popDesc(idTrigger,descID,popX,popY){
	var domTrigger=findDOM(idTrigger,0);
	var domDesc=findDOM(descID,1);
	if(isDHTML){
		t=2;
		if(oldDomDesc){
			//setClass(oldTrigger,'dateTrigger1');
			oldDomDesc.visibility='hidden';
			oldDomDesc.zIndex='0';
			t=2;
			lCount=0;
		}
		if(isID||isAll){
			descPos=findPosition(domTrigger);
			descTop=eval(descPos[1])+eval(popY)-40;
			descLeft=eval(descPos[0])+eval(popX)-70;
		}
		if(oldDomDesc!=domDesc){
			//setClass(idTrigger,'dateTriggerOn');
			domDesc.top=descTop+'px';
			domDesc.left=descLeft+'px';
			domDesc.visibility='visible';
			domDesc.zIndex='100';
			slideOpen(descID,'88','88');
			oldDomDesc=domDesc;
			oldTrigger=idTrigger;
		}else{oldDomDesc=null;}
	}else{return null;}
}
function delayHide(){
	if((oldDomDesc)&&(t==0)){
		oldDomDesc.visibility='hidden';
		oldDomDesc.zIndex='0';
		oldDomDesc=null;
		lCount=0;
		var domTrigger=findDOM(oldTrigger,0);
		//setClass(oldTrigger,'dateTriggerOff');
		return false;
	}
	if(t==2){lCount=0;return false;}
	if(t==1){
		lCount=lCount+1;
		if(lDelay<=lCount){t=0;}
		if(lDelay>=lCount){setTimeout('delayHide('+t+')',pause);}
	}
}
function findPosition(obj){
	tmpObj=obj;
	var obj_left=tmpObj.offsetLeft;
	var obj_top=tmpObj.offsetTop;
	if(tmpObj.offsetParent){
		while(tmpObj=tmpObj.offsetParent){
			obj_left+=tmpObj.offsetLeft;
			obj_top+=tmpObj.offsetTop;
		}
	}
	return [obj_left,obj_top];
}
function slideOpen(objectID,rightX,leftX){
	openObject=objectID;
	if(eval(leftX)>0){
		leftX=eval(leftX)-10;
		rightX=eval(rightX)+10;
		setClipLR(objectID,rightX+'px',leftX+'px');
		setTimeout('slideOpen("'+openObject+'","'+rightX+'","'+leftX+'")',10)
	}else{
		setClipLR(objectID,'auto','auto');
	}
}
function slideClosed(objectID,rightX,leftX){
	openObject=objectID;
	if(eval(leftX)<110){
		leftX=eval(leftX)+6;
		rightX=eval(rightX)-6;
		setClipLR(objectID,rightX+'px',leftX+'px');
		setTimeout('slideClosed("'+openObject+'","'+rightX+'","'+leftX+'")',10)
	}
}
function setClipLR(objectID,clipRight,clipLeft){
	var dom=findDOM(objectID,1);
	if(dom.clip.left){
		dom.clip.left=clipLeft;
		dom.clip.right=clipRight;
	}
	dom.clip='rect(auto '+clipRight+' auto '+clipLeft+')';
}

function checkResetInput(){
	if(document.miniregister.email.value==''){
		document.miniregister.email.value='email address';
	}
	if(document.miniregister.name.value==''){
		document.miniregister.name.value='full name';
	}
}

function checkMiniRegister(){
	if(document.miniregister.name.value=='' || document.miniregister.name.value=='full name'){
		document.miniregister.name.value='';
		alert('Some required information was incorectly entered into the form.\n\nPlease verify your Name.');
		document.miniregister.name.focus();
		return false;
	}
	if(document.miniregister.email.value=='' || document.miniregister.email.value=='email address'){
		document.miniregister.email.value='';
		alert('Some required information was incorectly entered into the form.\n\nPlease verify your Email Address.');
		document.miniregister.email.focus();
		return false;
	}
	document.miniregister.submit();
}