var z
var imagesOff=new Array()
var imagesOn=new Array()

var scTop
var autoon="no"
var lastIndex=0
var lastImage="none"
var currentlyClicked="no"

var docheight,docwidth
function toggleAuto() {
if (autoon=="no") {
	autoon="yes"
} else {
	autoon="no"
}
return true
}

var viewInformer
viewInformer=new Array()
function recordImageView(pId){
var ii=viewInformer.length
var url="http://easygome.com/inc/ajrecordimageview.asp?imgid=" + pId
viewInformer[ii]=GetXmlHttpObject(viewInformerResponse)
viewInformer[ii].open("GET", url , true)
viewInformer[ii].send(null)
}

function viewInformerResponse(){
    if (viewInformer[viewInformer.length-1].readyState==4 || viewInformer[viewInformer.length-1].readyState=="complete") {
var rt=viewInformer[viewInformer.length-1].responseText

}
}
function toggleButton(ind,iName,act) {

if (act=="on") {
	if (currentlyClicked!=iName) {
	if(imagesOn[parseInt(ind)]) {
	eval("document." + iName).src=imagesOn[parseInt(ind)].src
	}
	}
} else {
	if (currentlyClicked!=iName) {
	if(imagesOff[parseInt(ind)]) {
	eval("document." + iName).src=imagesOff[parseInt(ind)].src
	}
	} 
}
return
}
function addShoutProf() {
var sBox
sBox=document.getElementById("shoutArea")
sBox.innerHTML="<iframe name='shoutFrame' id='shoutFrame' src='http://easygome.com/inc/shoutboxinclude.asp' width='100%' height='91%' marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 style='border:3px solid #000088;margin:0px;padding:0px;' scrolling='no'></iframe>"
}
function addShoutBox(){
var sBox
sBox=document.getElementById("shoutChange")
sBox.innerHTML="<iframe name='shoutFrame' id='shoutFrame' src='http://easygome.com/inc/shoutboxinclude.asp' width='100%' height='100%' marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 style='position:relative;border:0px;margin:0px;padding:0px;width:100%;height:100%;overflow:hidden;' scrolling='no'></iframe>"
return true;
}


function addStatBox(){
var sBox
sBox=document.getElementById("shoutChange")
sBox.innerHTML="<iframe name='shoutFrame' id='shoutFrame' src='http://easygome.com/memberprofilestats.asp?memId=" + targetMemberId + "' width='100%' height='100%' marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 style='position:relative;border:0px;margin:0px;padding:0px;width:100%;height:100%;overflow:hidden;' scrolling='no'></iframe>"
return true;
}

function changeImage(imgNum) {
var np
np=document.getElementById("bmLink" + imgNum)
np.innerHTML="<img src='http://easygome.com/inc/setbm.asp?threadId=" + imgNum + "' height=17 width=17 border=0 align=middle>"
return true
}

function dodissable(imgNum) {
document.getElementById('deleteAnchor' + imgNum).innerHTML="<img src='http://easygome.com/inc/setdissabled.asp?threadId=" + imgNum + "' height=17 width=17 border=0 align=middle>"
return true
}

function giveShot(imgNum,thNum,receiver) {
var msg
msg=prompt("Enter a message then click okay to buy a shot for " + receiver + " worth 50 pts")
document.images['imgs' + imgNum + thNum].outerHTML="<img src='inc/giveshot.asp?memberId=" + imgNum + "&receiver=" + receiver + "&msg=" + msg + "' height=17 width=12 border=0 align=middle alt='" + receiver + " is considering accepting this shot and getting drunk with you'>"
return true
}
function pDelete(imgNum) {
document.images['imgp' + imgNum].outerHTML="<img src='http://easygome.com/deletepostshort.asp?pId=" + imgNum + "' height=17 width=17 border=0 align=middle>"
return true
}
function hideIt() {
	document.getElementById("utilityWindow").style.display="none"
}
function showWindow5() {
focusPart("utilityWindow")
	var theW,theH,theL,theWin
	theWin=document.getElementById("utilityWindow")
	theW=screen.width
	theH=screen.height
	theWin.style.width=parseInt(theW*.65) + "px"
	theWin.style.height=parseInt(theH*.55) + "px"
	theWin.style.left=parseInt((theW*.35)/2) + "px"
	theWin.style.top=parseInt((theH*.45)/3) + "px"
	theWin.style.zIndex=150000
	theWin.style.display="block"
}
function loadModelPage(pageName,strTitle,theW,theH) {
	 showInModel(pageName,theW,theH) 
	 setPopTitle(strTitle)
	 	var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
}
function viewLevelInfo(pLevel,pLevelName) {
loadModelPage("http://easygome.com/levelinfo.asp?lev=" + pLevel,pLevelName,500,400)
}

function viewImageInfo(pImageId) {
loadModelPage("http://easygome.com/imageinfoviewer.asp?imgid=" + pImageId,"BDBP Image Information.",500,400)
}

function viewTopList(pListId,pListTitle) {
loadModelPage("http://easygome.com/alltimelists.asp?listid=" + pListId,pListTitle,375,500)
}

function giveShotGift(pTarget,pAmount) {
loadModelPage("http://easygome.com/giveshotsa.asp?targetId=" + pTarget + "&shotAmount=" + pAmount,"Shot Gift Box",400,300)
}

function loadProfile(pMemId) {
window.location="http://easygome.com/memberprofile.asp?memid=" + pMemId
}
function showInfo(pageName) {
	var theW,theH,theL,theWin,theUrl
	theW=screen.width-200
	theH=screen.height-200
	 showInModel(pageName,theW,theH) 
	 	var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
}

function showUploadA(pageName) {
	var theW,theH,theL,theWin,theUrl
	theW=493
	theH=491
	 showInModel(pageName,theW,theH) 
	 	var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='20'
	fObj.marginheight='20'
	fObj.scrolling="no"
	fObj.frameBorder="0"
}
function addHelpItem55() {
		 focusPart("utilityWindow")
	var theW,theH,theL,theWin
	theWin=document.getElementById("utilityWindow")
	theW=screen.width
    theH=screen.height
	theWin.style.width=parseInt(theW*.65) + "px"
	theWin.height=parseInt(theH*.60) + "px"
	theWin.style.left=parseInt((theW*.35)/2) + "px"
	theWin.style.top=parseInt(theH*.40/3) + "px"
	theWin.style.zIndex=150000
	theWin.style.display="block"
	var theFrame=document.getElementById("utilityFrame")
	theFrame.src="http://easygome.com/RTE/helpstartform.asp"
}
function addThreadItem(memId) {
	if (memId!=null) {
		if (memId>0) {
	var pSizeArray=getPageSize()
	var theW=pSizeArray[2]
	var theH=pSizeArray[3]
	var theBoxW=parseInt(theW*.85) 
	var theBoxH=parseInt(theH*.85)
	var theUrl="http://easygome.com/threadStartForm.asp?memId=" + memId
	showInModel(theUrl,710,440) 
		var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
	}
	}
}

function addHelpItem() {
	var pSizeArray=getPageSize()
	var theW=pSizeArray[2]
	var theH=pSizeArray[3]
	var theBoxW=parseInt(theW*.85) 
	var theBoxH=parseInt(theH*.85)
	var theUrl="http://easygome.com/helpstartform.asp"
	showInModel(theUrl,750,425) 
		var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
}

// arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
function addPmThreadItem(targetId,targetName) {
	var theW,theH,theL,theWin
	if (memId!=null) {
		if (memId>0) {
	var pSizeArray=getPageSize()
	var theW=pSizeArray[2]
	var theH=pSizeArray[3]
	var theBoxW=parseInt(theW*.85) 
	var theBoxH=parseInt(theH*.85)
	var theUrl="http://easygome.com/RTE/pmStartForm.asp?targId=" + targetId + "&targName=" + targetName
	showInModel(theUrl,725,425)  
		var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
	}
	}
}
	function displayShot(imgNum,thNum,receiver) {
	var theW,theH,theL,theWin,theUrl
	theW=500
	theH=200
	theUrl="http://easygome.com/shotdisplayboxsql.asp"
	 showInModel(theUrl,theW,theH) 
	 	var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
}

	function showSingleShot(pShotId) {
	var theW,theH,theL,theWin,theUrl
	theW=500
	theH=200
	theUrl="http://easygome.com/displaysingleshotmessage.asp?tsid=" + pShotId
	 showInModel(theUrl,theW,theH) 
	 	var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
}
function startShot(imgNum,thNum,receiver) {
	var theW,theH,theL,theWin,theUrl
	theW=500
	theH=200
	theUrl="http://easygome.com/inc/shotboxsql.asp?recId=" + receiver + "&imgNum=" + imgNum + "&thNum=" + thNum
	 showInModel(theUrl,theW,theH) 
	 	var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
}

function freezeShots(receiverId) {
	var arShotLinks=getElementsByClassName(document, "a", "changeName" + receiverId);
	var i
	var shotIcon="<img align=middle height=17 width=12 border=0 src=http://easygome.com/images/shotglassfull.gif >&nbsp;"
	for (i=0;i<arShotLinks.length;i++) {
		if (arShotLinks[i]) {
			arShotLinks[i].innerHTML=shotIcon
		}	
	}
}
function getElementsByClassName(oElm, strTagName, strClassName){
	var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
	var arrReturnElements = new Array();
	strClassName = strClassName.replace(/\-/g, "\\-");
	var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
	var oElement;
	for(var i=0; i<arrElements.length; i++){
		oElement = arrElements[i];		
		if(oRegExp.test(oElement.className)){
			arrReturnElements.push(oElement);
		}	
	}
	return (arrReturnElements)
}

function startShot2(imgNum,thNum,receiver) {
focusPart("utilityWindow")
	var theW,theH,theL,theWin
	scTop=findScrollTop()
	theWin=document.getElementById("utilityWindow")
	theW=screen.width
	theH=screen.height
	theWin.style.width=500
	theWin.style.height=200
	theWin.style.zIndex=150000
	theWin.style.display="block"

	var theFrame=document.getElementById("utilityFrame")
	theFrame.src="http://easygome.com/inc/shotboxsql.asp?recId=" + receiver + "&imgNum=" + imgNum + "&thNum=" + thNum

	}

	function closeWindow() {
		var bd=document.getElementById("backDrop")
		bd.style.zIndex=-100
		bd.style.display="none"
	var theWin
	theWin=document.getElementById("utilityWindow")
	theWin.style.display="none"
	}
	function goTo() {
	window.scroll(0, parseInt(scTop))
	}
	function displayShot2(imgNum,thNum,receiver) {
focusPart("utilityWindow")
	var theW,theH,theL,theWin
	scTop=findScrollTop()
	theWin=document.getElementById("utilityWindow")
	theW=screen.width
	theH=screen.height
	theWin.style.width=parseInt(theW*.65) + "px"
	theWin.style.height=parseInt(theH*.55) + "px"
	theWin.style.left=parseInt((theW*.35)/2) + "px"
	theWin.style.top=parseInt((theH*.15)/2 + parseInt(scTop)) + "px"
	theWin.style.zIndex=150000
	theWin.style.display="block"
	var theFrame=document.getElementById("utilityFrame")
	theFrame.src="http://easygome.com/shotdisplayboxsql.asp"
	}
	function displaySingleShot(aShotId) {
	focusPart("utilityWindow")
	var theW,theH,theL,theWin
	scTop=findScrollTop()
	theWin=document.getElementById("utilityWindow")
	theW=screen.width
	theH=screen.height
	theWin.style.width=parseInt(theW*.65) + "px"
	theWin.style.height=parseInt(theH*.55) + "px"
	theWin.style.left=parseInt((theW*.35)/2) + "px"
	theWin.style.top=parseInt((theH*.15)/2 + parseInt(scTop)) + "px"
	theWin.style.zIndex=150000
	theWin.style.display="block"
	
	var theFrame=document.getElementById("utilityFrame")
	theFrame.src="http://easygome.com/displaysingleshotmessage.asp?tsid=" + aShotId
	}
function focusPart(winName) {
	var bd=document.getElementById("backDrop").style
	bd.position="absolute"
	bd.display="block"
	bd.width=screen.width
	bd.height=screen.height
	bd.top="0px"
	bd.left="0px"
	bd.zIndex=100000	
var tWin=document.getElementById(winName)
tWin.style.position="absolute"
tWin.style.visibility="visible"
}
var pRTE;
var pRng;
var pSelection;

 function recordPosition() {
	if (document.all) {
		pRTE=FCKeditorAPI.GetInstance('textarea');
		 pSelection = pRTE.EditorDocument.selection; 
		if (pSelection != null) {
			pRng = pSelection.createRange();
		}
	} 
}
function grabFile(mmmId,thid,pSecLev) {
		recordPosition()
	var theW=getViewportWidth()
	var theH=getViewportHeight()
	var theBoxW=parseInt(theW*.85) 
	var theBoxH=parseInt(theH*.85)
	var theUrl="http://easygome.com/filegrabsql.asp?memId=" + mmmId + "&thid=" + thid + "&sl=" + pSecLev
	showInModel(theUrl,700,350) 
	var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
}
		function grabFile2(mmmId,thid) {
		recordPosition()
	var theW=getViewportWidth()
	var theH=getViewportHeight()
	var theBoxW=parseInt(theW*.85) 
	var theBoxH=parseInt(theH*.85)
	var theUrl="http://easygome.com/filegraburlsql.asp?memId=" + mmmId + "&thid=" + thid
	showInModel(theUrl,700,350) 
	var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
	}
			function insertPostableImage(mmmId) {
		recordPosition()
	// var pSizeArray=getPageSize()
	var theW=getViewportWidth()
	var theH=getViewportHeight()
	var theBoxW=parseInt(theW*.75) 
	var theBoxH=parseInt(theH*.85)
	var theUrl="http://easygome.com/memberimagelist.asp?memId=" + mmmId
	showInModel(theUrl,theBoxW,theBoxH) 
	var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="yes"
	fObj.frameBorder="0"
	}
	
				function insertFromBucket() {
		recordPosition()
	// var pSizeArray=getPageSize()
	var theW=getViewportWidth()
	var theH=getViewportHeight()
	var theBoxW=parseInt(theW*.75) 
	var theBoxH=parseInt(theH*.85)
	var theUrl="http://easygome.com/scope-bucket.asp?caller=1"
	showInModel(theUrl,778,488) 
	var fObj=document.getElementById("popupFrame")
	var tBar=document.getElementById("popupTitleBar")
	tBar.style.display="none"
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
	}
					function singePollResult(pQid) {
		recordPosition()
	// var pSizeArray=getPageSize()
	var theW=getViewportWidth()
	var theH=getViewportHeight()
	var theBoxW=parseInt(theW*.75) 
	var theBoxH=parseInt(theH*.98)
	var theUrl="http://easygome.com/singlepolldisplay.asp?qid=" + pQid
	showInModel(theUrl,778,600) 
	var fObj=document.getElementById("popupFrame")
	var tBar=document.getElementById("popupTitleBar")
	tBar.style.display="none"
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
	}
					function insertFromGallifier() {
		recordPosition()
	// var pSizeArray=getPageSize()
	var theW=getViewportWidth()
	var theH=getViewportHeight()
	var theBoxW=parseInt(theW*.75) 
	var theBoxH=parseInt(theH*.85)
	var theUrl="http://easygome.com/scope-bucket-turbo.asp?caller=1"
	showInModel(theUrl,778,488) 
	var fObj=document.getElementById("popupFrame")
	var tBar=document.getElementById("popupTitleBar")
	tBar.style.display="none"
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
	}
				function openPostableGallery(mmmId) {
	// var pSizeArray=getPageSize()
	var theW=getViewportWidth()
	var theH=getViewportHeight()
	var theBoxW=parseInt(theW*.75) 
	var theBoxH=parseInt(theH*.85)
	var theUrl="http://easygome.com/memberimagelist.asp?memId=" + mmmId
	showInModel(theUrl,theBoxW,theBoxH) 
	var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="yes"
	fObj.frameBorder="0"
	}
			function grabVideo() {
		recordPosition()
	var theW=getViewportWidth()
	var theH=getViewportHeight()
	var theBoxW=parseInt(theW*.85) 
	var theBoxH=parseInt(theH*.85)
	var theUrl="http://easygome.com/videograburlsql.htm"
	showInModel(theUrl,700,350) 
	var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="no"
	fObj.frameBorder="0"
	}
function fillShot(shotName) {
	document.getElementById(shotName).outerHTML="<img height=17 border=0 src='http://easygome.com/images/shotglassfull.gif' >"
}
var curTrick
var curTrickName
function startMenuShot() {
	startShot(curTrick,1,curTrickName)
}
function goIt(pName) {
document.location=pName + curTrick
}
var defaultMenuWidth="150px" //set default menu width.
var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT
linkset[0]='<a href="javascript:goIt(\'http://easygome.com/memberhomepage.asp?memid=\');">Home Page</a>'
linkset[0]+='<hr>' //Optional Separator
linkset[0]+='<a href="javascript:goIt(\'http://easygome.com/memberprofile.asp?memid=\');">Main Profile</a>'
linkset[0]+='<a href="javascript:goIt(\'http://easygome.com/memberprofilequestions.asp?tmid=\');">Profile Details</a>'
linkset[0]+='<a href="javascript:goIt(\'http://easygome.com/memberprofilequestions.asp?cid=0&tmid=\');">HotShots</a>'
linkset[0]+='<a href="javascript:goIt(\'http://easygome.com/allthreads.asp?trickAction=addOne&hotTrick=starter&Id=\');">Threads</a>'
linkset[0]+='<a href="javascript:startMenuShot();">Send Shot</a>'

var alph
alph="1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ,_&-# "
     function cleanGood(str) {
var ix
var newStr=""
var startStr=str
var startStrU=str.toUpperCase()
for (ix=0;ix<startStrU.length;ix++) {
	if (alph.indexOf(startStrU.charAt(ix))>=0) {
	newStr=newStr + startStrU.charAt(ix)
	}
	}
return newStr
}

var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)"></div>')

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth){
if (!document.all&&!document.getElementById)
return
clearhidemenu()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.innerHTML=which
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY
var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY
if (rightedge<menuobj.contentwidth)
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
else
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"
if (bottomedge<menuobj.contentheight)
menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
else
menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"
menuobj.style.visibility="visible"
return false
}
function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
function hidemenu(){
if (window.menuobj)
menuobj.style.visibility="hidden"
}
function dynamichide(e){
if (ie5&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}
function delayhidemenu(){
delayhide=setTimeout("hidemenu()",500)
}
function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}
if (ie5||ns6)
document.onclick=hidemenu
		 function showHelp(strFile,strTitle) {
		 loadModelPage(strFile,'INSTRUCTIONS: How to use tags',500,600)
		 }
function showBookmark(strFile,strTitle) {
		getWindowData()
		var tempW=parseInt(.75*docwidth)
		var tempH=parseInt(.85*docheight)
	showInModel(strFile,tempW,tempH) 
	 setPopTitle(strTitle)
	var fObj=document.getElementById("popupFrame")
	fObj.marginwidth='0'
	fObj.marginheight='0'
	fObj.scrolling="yes"
	fObj.frameBorder="0"
		 }	 
function getWindowData(){ //get window data
	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	scroll_top=(ie)? standardbody.scrollTop : window.pageYOffset
	scroll_left=(ie)? standardbody.scrollLeft : window.pageXOffset
	docwidth=(ie)? standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	docheight=(ie)? standardbody.clientHeight: window.innerHeight
}
function howFarX(destinationObj) {
return parseInt(scroll_left+(docwidth-destinationObj.offsetWidth)/2)
}
function howFarY(destinationObj) {
    getWindowData()
    return parseInt((docheight-destinationObj.offsetHeight)/2)
}
function setSize(wnObj, w, h){ 
	wnObj.style.width=parseInt(w) + "px"
	wnObj.style.height=parseInt(h) + "px"
}
function centerMe(wnObj){ 
	getWindowData()
	wnObj.style.left=scroll_left+(docwidth-wnObj.offsetWidth)/2+"px" 
	wnObj.style.top=scroll_top+(docheight-wnObj.offsetHeight)/2+"px" 
}

function openShowManager() {
	showPopWin("http://easygome.com/scopeshowmanager.asp",500,600, null)
	setPopTitle("Scope Show Manager:")
}

function openGalleryManager() {
	showPopWin("http://easygome.com/scopegallerymanager.asp",500,600, null)
	setPopTitle("Scope Gallery Manager:")
}
function openScrapeSetManager() {
	showPopWin("http://easygome.com/scrapesetmanager.asp",500,600, null)
	setPopTitle("Scrape Set Manager:")
}

function newPerson(persId,catId) {
hidePopWin()
window.location="http://easygome.com/memberprofilequestions.asp?tmid=" + persId + "&cid=" + catId
}
