/*
*********************************************************************
Language:       Javascript 1.5
Web Site:       http://www.trypb.com/
File Path:      /_scripts/
Copyright:      ©2006 Jamie Peloquin (http://www.jamiepeloquin.com)
Created:        2006-12-11 11:28:09
*********************************************************************
*******************************************************************
Javascript worksheet
*******************************************************************
*/
/* FORMS --------------------------------------------------------- */
/* BEGIN: Submit Form */
function form_submit($FORM) {
	document.getElementById($FORM).submit();
}
/* BEGIN: Submit Form */



/* CSS CONTROL --------------------------------------------------- */
/* BEGIN: Toggle Show/Hide */
function cssToggleShow(OID,DISP) {
	// OID = Object's ID
	// DISP = block, inline, list-item
	var thisOID = document.getElementById(OID);
	if(thisOID.style.display == "none"){
		thisOID.style.display=DISP;
	}
	else{
		thisOID.style.display="none";
	}
}
/* END: Toggle Show/Hide */

/* BEGIN: Experience Client Testimonial Toggle */
function cssTestimonialToggle(CLIENT) {
    // Set array of Experience Testimonials
    var pbExp = new Array();
    pbExp[0] = "advantagepayroll";
    pbExp[1] = "coastalbank";
    pbExp[2] = "nophishingorg";
    pbExp[3] = "norwaysavingsbank";
    
    // Set all testimonials to a negative z-index and default color
    for(i = 0; i < pbExp.length; i++) {
        document.getElementById('test_' + pbExp[i]).style.visibility = "hidden";
        // document.getElementById('test_' + pbExp[i]).style.zIndex = "-100";
        document.getElementById('client_' + pbExp[i]).style.backgroundColor = "transparent";
    }

    // Bring called to front
    // document.getElementById('test_'+CLIENT).style.zIndex = "100";
    document.getElementById('test_'+CLIENT).style.visibility = "visible";
   
    // Color link background
    document.getElementById('client_'+CLIENT).style.backgroundColor = "#f6e6b8";
}
/* END: Experience Client Testimonial Toggle */


/* WINDOWS ------------------------------------------------------- */
/* BEGIN: Pop Window Generic - Centered */
function pop_generic(NAME,URL,WD,HT,TOOL,LOCATION,MENU,SCROLL,STATUS,RESIZE){
	if(!NAME){NAME = "genWin"}
	if(!WD){WD = "800"}
	if(!HT){HT = "600"}
	if(!TOOL){TOOL = "yes"}
	if(!LOCATION){LOCATION = "yes"}
	if(!MENU){MENU = "yes"}
	if(!SCROLL){SCROLL = "yes"}
	if(!STATUS){STATUS = "yes"}
	if(!RESIZE){RESIZE = "yes"}
	var halfW = (WD/2)
 	var halfH = (HT/2)
   	var screenW = screen.availWidth
    var screenH = screen.availHeight
    
    var screenX = ((screenW / 2) - halfW) // is half the width of the window
    var screenY = ((screenH / 2) - halfH) // is half the height of the window
	
	var WINNAME = NAME+'_win'
	if(document.layers){ //Fixes Netscape 4 bug
    	var NAME = window.open(URL, WINNAME);
	}
	else{
		var NAME = window.open(URL, WINNAME, 'width='+WD+', height='+HT+', top='+screenY+', left='+screenX+', toolbar='+TOOL+', location='+LOCATION+', menubar='+MENU+', scrollbars='+SCROLL+', status='+STATUS+', resizable='+RESIZE);
    }
    NAME.focus();
}
/* END: Pop Window Generic - Centered */
