//NAVIGATION 
function adorder(url) {
	if (url == '')
		url = 'http://.com/webentry';

	var adWindow;
	if (adWindow = window.open(url,'weboe', 'width=800,toolbar=no,location=yes,menubar=no,scrollbars=yes,resizable=yes')) {
		adWindow.focus();
	} else {
		alert('You must allow popups from this site in order to place an ad.');
	}
	return false;
}
//-->

<!-- HIDE SCRIPT
// GENERIC COOKIE SCRIPT (Next 3 functions)
function getCookieVal(offset) {
	var endstr=document.cookie.indexOf(";",offset);

	if (endstr==-1)
	endstr=document.cookie.length;
	return unescape(document.cookie.substring(offset,endstr));
}

function GetCookie(cname) {
	var arg=cname+"=";
	var alen=arg.length;
	var clen=document.cookie.length;
	var i=0;

	while (i<clen) {
		var j=i+alen;
		if (document.cookie.substring(i,j)==arg) return getCookieVal (j);                 i=document.cookie.indexOf(" ",i)+ 1;
		if (i==0) break;
	} return null;
}

function SaveCookie(cname,cvalue,cdays,cpath) {
	ex = new Date;
	ex.setTime(ex.getTime() + (cdays*86400000));

	if (cpath == null) { cpath = "/" };
	cpath = "; path=" + cpath;
	if (cdays == null) { cdays = "" } else { cdays = "; expires=" + ex.toGMTString() }
	document.cookie = cname + '=' + cvalue + cdays + cpath + ";domain=" + location.host.replace(/.*\.(.*\.com)/,"$1") + ";";
}

function readCookie(name) {
	var cookieValue = "";
	var search = name + "=";
	if(document.cookie.length > 0) { 
		offset = document.cookie.indexOf(search);
		if (offset != -1) { 
			offset += search.length;
			end = document.cookie.indexOf(";", offset);
			if (end == -1) end = document.cookie.length;
			cookieValue = unescape(document.cookie.substring(offset, end))
		}
	}
	return cookieValue;
}

function parseCookie(cookie, key) {
	var valArray = cookie.split("|");
	for (i = 0; i < valArray.length; i++) {
		if (valArray[i].match(key)) {var value = valArray[i].split("="); return value[1];}
	}
	return null;
}

// GENERIC WINDOW OPENER (pass window options to function)
function openWin(url,name,options) {
	win = window.open(url,name,options);
	self.name = "main";
	win.focus();
}

// PHOTO GALLERY POPUP (preset window options)
function photoGallery(url) {
	galleryWindow = window.open(url,'gallerypopup','status=yes,width=660,height=600,scrollbars=auto,resizable=yes');
	galleryWindow.focus();
}

// PHOTO GALLERY POPUP2 (preset window options)
function photoGallery2(url) {
	galleryWindow = window.open(url,'gallerypopup','status=yes,width=800,height=550,scrollbars=auto,resizable=yes');
	galleryWindow.focus();
}

// 24 HOUR PHOTO GALLERY POPUP (preset window options)
function goGallery(url) {
        var hackedUrl = "/24hour" + url;
	galleryWindow = window.open(hackedUrl,'gallerypopup','status=yes,width=660,height=600,scrollbars=auto,resizable=yes');
	galleryWindow.focus();
}

// VIDEO GALLERY POPUP (preset window options)
function videoGallery(url) {
	videoWindow = window.open(url,'videopopup','status=yes,width=485,height=400,scrollbars=auto,resizable=yes');
	videoWindow.focus();
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=400,height=285');");
}

// VIDEO 2 GALLERY POPUP -- FOR LONGER DESCRIPTIONS (preset window options)
function video2Gallery(url) {
	videoWindow = window.open(url,'videopopup2','status=yes,width=485,height=550,scrollbars=auto,resizable=yes');
	videoWindow.focus();
}


// FLASHVIDEO GALLERY POPUP (preset window options)
function flashvideo(url) {
	videoWindow = window.open(url,'flashvideo','status=yes,width=400,height=480,scrollbars=auto,resizable=yes');
	videoWindow.focus();
}


// AUDIO POPUP (preset window options)
function audioGallery(url) {
	videoWindow = window.open(url,'videopopup','status=yes,width=435,height=200,scrollbars=auto,resizable=yes');
	videoWindow.focus();
}

// AUDIO2 POPUP - boxier longer descriptions (preset window options)
function audio2Gallery(url) {
	videoWindow = window.open(url,'videopopup','status=yes,width=410,height=300,scrollbars=auto,resizable=yes');
	videoWindow.focus();
}

// SLIDESHOW POPUP - (preset window options)
function slideshowGallery(url) {
	slideshowWindow = window.open(url,'slideshowpopup','status=yes,width=800,height=630,scrollbars=auto,resizable=yes');
	slideshowWindow.focus();
}

// RYAN MOORE POPUP (preset window options)
function specialGallery(url) {
	galleryWindow = window.open(url,'gallerypopup','status=yes,width=640,height=500');
	galleryWindow.focus();
}

// FIX MAIL LINKS (part of obscuring e-mail addresses, puts address back together)
function fixMail(to,domain,tld) {
	if (tld == undefined) {tld = "com";}
	if (domain == undefined) {domain = "mail.tribnet";}
	document.location="ma"+"ilto:"+to+"\@"+domain+"\."+tld;
} 

// PULLDOWN MENU SCRIPT
function formHandler(pulldownform){
var URL = document.pulldownform.site.options[document.pulldownform.site.selectedIndex].value;
window.location.href = URL;
}
function formHandler2(pulldownform2){
var URL = document.pulldownform2.site2.options[document.pulldownform2.site2.selectedIndex].value;
window.location.href = URL;
}

// UPDATE COOKIES
var insitecookie="tacoma_user_auth";
var threshold=0;
var daystokeep=1;

if (GetCookie(insitecookie) && !GetCookie(insitecookie).match("threshold")) {
    if (!GetCookie('seentoday')) {
         document.write('<img width="1" height="1" border="0" ');
		 document.write("src='http://www..com/static/secure/log.gif?pg="+escape(document.location)+"'>");
         SaveCookie('seentoday',1,.9,'/')
    }
}
// END HIDING -->



<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=660,left = 340,top = 212');");
}
// End -->




<!-- Begin
function wallpaperWindow(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=660,height=620,left = 340,top = 212');");
}
// End -->