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();
}

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;}
}
function swapVideo(v_url,v_description){
	var dom=findDOM('videoswap',0);
	if(dom){
		dom.innerHTML='<div id="videoframe"><object width="365" height="298"><param name="movie" value="'+v_url+'"></param><embed src="'+v_url+'" type="application/x-shockwave-flash" width="365" height="298"></embed></object></div><br />'+v_description;
	}
}


function swapImage(newDiv,swapSrc){
	document.images[newDiv+'Img'].src="/images/uploads/"+swapSrc;
	var fullSizeImage=findDOM('fullSizeImage',0);
	var newDiv=findDOM(newDiv,0);
	fullSizeImage.innerHTML=newDiv.innerHTML;
}


function swapGalleryImg(imgSrc,imgHeight,imgWidth,imgDescription){
	document.images['galleryImg'].src='/images/uploads/'+imgSrc;
	document.images['galleryImg'].height=imgHeight;
	document.images['galleryImg'].width=imgWidth;
	var dom=findDOM('imagedescription',0);
	dom.innerHTML=imgDescription;
}


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();
}