var accordion = null;
var nS8 = null;
var activeSideNav = 20;

window.addEvent('domready', function() {
	$$('.searchbox').addEvent('click', ClearField);
	$$('#logo').addEvent('click', HomeClick);
	$$('#backbutton').addEvent('click', BackButton);

/*	var protector = new dwProtector({  
         image: '/assets/images/fppi-water-mark-big-rev1.png',  
         elements: $$('img.protect')  
     });  	
	*/
/***********************************************
* Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//form tags to omit in NS6+:

var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}



//tech docs create collection

$$('.custom-docs-check').addEvent('click', AddRemoveCustomDoc);
	
	
});



//append or remove item from list
function AddRemoveCustomDoc()
{	
		var controlmy = document.getElementById("ctl00_ctl00_ContentMain_ContentLeft_ctlCustomDocsCollection");
		var tecdoccount = 0;
		if(controlmy.value.indexOf(this.name)>-1)
		{
			controlmy.value = controlmy.value.replace(this.name + "|","");
			tecdoccount = tecdoccount - 1;
		}
		else
		{
			//debugger;
			if(controlmy.value.split("|").length > 10)
			{
				alert("Please limit your selection to 10 documents only.");
				this.checked = false;
				}
			else
			{
				controlmy.value += this.name + "|";
				tecdoccount = tecdoccount + 1;
			}
		}
		
		//this.value = '';
}


//clear search box on click
function ClearField()
{
		this.value = '';
}

//clear search box on click
function HomeClick()
{document.location.href = "/";}
function BackButton()
{history.go(-1);return false;}



