
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//	see tdh3/shared/includes/global_objectnames.asp
// make this mm_js.asp
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//	TDH specific
function toggle(layerID,imageBt){resourceBox=new Cookie(layerID.id);resourceBox.path="/";resourceBox.domain="thedoghouse.org";var collapse=/collapse*/g;if(collapse.test(imageBt.src)){layerID.style.display="none"; imageBt.src="/tdh3/images/essential/resrc_expand.gif"; imageBt.alt="Closed: Click here to get the navigation back.";resourceBox.store("false");}else{layerID.style.display="block";imageBt.alt="Open: Click here get more space."; resourceBox.store("true")}}function toggleSection(layerID,imageBt){resourceBox=new Cookie(layerID.id);resourceBox.path="/";resourceBox.domain="thedoghouse.org";var collapse=/not_*/g;if(collapse.test(imageBt.src)){layerID.style.display="none";imageBt.src="http://thedoghouse.org/images/essential/subsection.gif";imageBt.alt="Closed: Click here to expand the list";resourceBox.store("false");}else{layerID.style.display="block";imageBt.src="http://thedoghouse.org/images/essential/not_subsection.gif";imageBt.alt="Open: Click here to hide the list";resourceBox.store("true");}}function toggleNavigation(layerID,imageBt){resourceBox=new Cookie(layerID.id);resourceBox.path="/";resourceBox.domain="thedoghouse.org";var collapse=/not_*/g;if(collapse.test(imageBt.src)){layerID.style.display="none";imageBt.src="http://thedoghouse.org/images/essential/up.gif";imageBt.alt="Closed: Click here to expand the list";resourceBox.store("false");}else{layerID.style.display="block";imageBt.src="http://thedoghouse.org/images/essential/not_up.gif";imageBt.alt="Open: Click here to hide the list";resourceBox.store("true");}}function Cookie(name,expires,domain,path,isSecure) {this.name=name;this.expires=expires;this.domain=domain;this.path=path;this.isSecure=isSecure;}function Cookie_get() {var theWholeCookie=document.cookie;var cookieStart=theWholeCookie.indexOf(this.name);if(cookieStart==-1) return"";else cookieStart+=this.name.length+1;var cookieEnd=theWholeCookie.indexOf(";",cookieStart);if(cookieEnd==-1) cookieEnd=theWholeCookie.length;var theCookie=theWholeCookie.substring(cookieStart,cookieEnd);return unescape(theCookie);} function Cookie_store(string) {document.cookie= this.name+"=" +escape(string)+((this.expires)?"; expires=" +this.expires.toGMTString():"")+((this.path)?"; path=" +this.path:"")+((this.domain)?"; domain=" +this.domain:"")+((this.isSecure)?"; secure" :"");} function Cookie_del() {document.cookie= this.name+"=" +((this.expires)?"; expires=" +(new Date(0)).toGMTString():"")+((this.path)?"; path=" +this.path:"")+((this.domain)?"; domain=" +this.domain:"");}new Cookie();Cookie.prototype.store=Cookie_store;Cookie.prototype.get=Cookie_get;Cookie.prototype.del=Cookie_del;// Generated 22:18 11/12/2003
function printPage() 			{print(document);}
function setStatusBar(msgStr) 	{self.status = msgStr;}
function close_window() 		{window.close();}

// Requires src="ExpandCollapse.js"
var L_UNDEFINED_TEXT = "Help could not locate this inline definition.";
function MM_InlineDefNotFound() { alert(L_UNDEFINED_TEXT); }
function MM_AppendPopup(oSource,sPopup)
{InitializeGlobalData();if(typeof(allDivs)=='undefined'||null==allDivs)return;var theDiv=allDivs['divInlineDef_'+sPopup];if(typeof(theDiv)=='undefined'||null==theDiv)
{MM_InlineDefNotFound();return;}if(theDiv.style.display.toUpperCase()!='INLINE')
theDiv.style.display='inline'; else theDiv.style.display='none';}



// This is where we pull in some vars defined in ASP 
// that we have to cross ober into JS for consistency.
// #include virtual="/tdh3/shared/includes/global_objectnames.asp"  
// Global Vars ------------------------------- //
var FAQ_WindowName 		= 'FAQ';
var PAYPAL_WindowName 	= 'PAYPAL';
var WORKFLOW_WindowName = 'WORKFLOW';
var PROFILES_WindowName = 'PROFILES';
var PHOTOS_WindowName 	= 'PHOTOS';

	// what is the standard pop-up look and feel ?
var FAQ_features = 'alwaysRaised=yes,scrollbars=yes,resizable=yes,width=300,height=500,left=10,top=10,screenX=10,screenY=10' 
	// This is the sizing of the Paypal windows - same look and feel. 
var PAYPAL_features = 'alwaysRaised=yes,scrollbars=no,resizable=yes,width=400,height=440' 

	// This is for workflow
var WORKFLOW_features = 'alwaysRaised=yes,scrollbars=no,resizable=yes,width=500,height=350' 
	// This is for peoples profiles
var PROFILES_features = 'alwaysRaised=yes,scrollbars=yes,resizable=yes,width=800,height=350,left=10,top=10' 
	// This is for peoples profiles
var PHOTOS_features = 'alwaysRaised=yes,scrollbars=no,resizable=no,width=300,height=400' 



// 	Marcomedia ------------------------------- //
// These are unchanged and keep all their faults.
//
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&document.getElementById)x=document.getElementById(n);return x;} //v4.0
// eg MM_validateForm('U_ID','','R','U_FIRST','','R','U_LAST','','R','U_EMAIL','','RisEmail','U_PASSWORD','','R');
function MM_validateForm(){var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;for(i=0;i<(args.length-2);i+=3){test=args[i+2];val=MM_findObj(args[i]);if(val){nm=val.name;if((val=val.value)!=""){if(test.indexOf('isEmail')!=-1){p=val.indexOf('@');if(p<1||p==(val.length-1))errors+='- '+nm+' must contain an e-mail address.\n';}else if(test!='R'){if(isNaN(val))errors+='- '+nm+' must contain a number.\n';if(test.indexOf('inRange')!=-1){p=test.indexOf(':');min=test.substring(8,p);max=test.substring(p+1);if(val<min||max<val)errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';}}}else if(test.charAt(0)=='R')errors+='- '+nm+' is required.\n';}}if(errors)alert('The following error(s) occurred:\n'+errors);document.MM_returnValue=(errors=='');} //v4.0
// 
//	MM_jumpMenu('parent.mitte',this,1)
function MM_jumpMenu(targ,selObj,restore){eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if(restore)selObj.selectedIndex=0;} //v4.0
// eg MM_preloadImages('2d367fbb.gif','whipbench1_250.gif')
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++) if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}} //v4.0
// 
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3);if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}//v4.0
// 
function MM_goToURL(){var i,args=MM_goToURL.arguments;document.MM_returnValue=false;for(i=0;i<(args.length-1);i+=2)eval(args[i]+".location='"+args[i+1]+"'");} //v4.0

// v5.0	eg MM_openBrWindow('changeadvert.asp',FAQ_WindowName,FAQ_features);
function MM_openBrWindow(theURL,winName,features){if(theURL==null||theURL==''){exit;}if(winName==null||winName==''){winName='popupWin';}if(features==null||features==''){features='alwaysRaised=yes,scrollbars,resizable,toolbar,status,width=640,height=480,left=50,top=50';}window.open(theURL,winName,features);}
// 
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;} //v4.0
// 
function GoToURL(strX){if(strX=="" ||strX==null||strX=="undefined"){return;}window.top.location.href=strX;} //v4.0

// 	Doghouse variations on Marcomedia ------------------------------- //

// TDH variation v1.0 Open window   and set focus
function DH_openFocusWindow(theURL,winName,features){if(theURL==null||theURL==''){exit;}if(winName==null||winName==''){winName='popupWin';}if(features==null||features==''){features='alwaysRaised=yes,scrollbars,resizable,toolbar,status,width=640,height=480,left=50,top=50';}var mm=window.open(theURL,winName,features);mm.focus(); } 
