//gets the document properties in order to use them as there are many types of browers with different versions
function getDocID(tagLayer)
{
	var tagProp = "";//holds the proerties of tagLayer

	//gets the whichLayer Properties depending of the differnt bowers the user is using
	if (document.getElementById)//this is the way the standards work
		tagProp = document.getElementById(tagLayer);
	else if (document.all)//this is the way old msie versions work
		tagProp = document.all[tagLayer];
	else if (document.layers)//this is the way nn4 works
		tagProp = document.layers[tagLayer];
		
	return tagProp;
}//end of getDocID()

//shoes and hides a <div> using display:block/none from the CSS
function toggleLayer(tagLayer)
{
	var tagStyle = '';//holds the style of tagLayer

	//gets the whichLayer Properties
	tagStyle = getDocID(tagLayer);
	
	if (tagStyle != ''){tagStyle.style.display = tagStyle.style.display? "":"block";}
}//end of toggleLayer()

//set the page to be either the home page settings or a section settings as there will be two different settings for this site
//this is Funtion is ONLY for Levine Site
function sectionHome(intHome)
{
	var oldonload=window.onload;//holds any prevs onload function from the js file

	//gets the onload window event checks if there is a function that is already in there
	//if so then add in the initTabs() to the event if not then just the initTabs() 
	window.onload=function(){
		if(typeof(oldonload)=='function')
			oldonload();
		
		var tagSideBar = getDocID('divBasicNavigation');//holds the side bar tag
		
		//checks if the page is either the Home Page or Section
		//and changes the padding-top so that the bar is either on the edge for the home page or below the gray bar in the section
		if(intHome == 1)
		{
  			if(navigator.platform.indexOf("Mac") > -1)
			{
				if(navigator.userAgent.indexOf('Firefox') !=-1)
					tagSideBar.style.paddingTop = "261px";//"215px";
				else
					tagSideBar.style.paddingTop = "252px";//"215px";
			}//end of if
			else
			{
				//Because IE is not Startand the browser things the code is string until they fix it it will have to be like this 
				//checks if the user is uing IE or another Browser navigator.platform
				if (navigator.userAgent.indexOf('MSIE') !=-1)
				{
					//checks which version of IE the user is using 7 or 6 or 8
					if (navigator.appVersion.indexOf('MSIE 7') !=-1)
						tagSideBar.style.paddingTop = "285px";//"242px";
					else if(navigator.appVersion.indexOf('MSIE 8') !=-1)
						tagSideBar.style.paddingTop = "257px";//"242px";
					else
						tagSideBar.style.paddingTop = "261px";//"218px";
				}//end of if
				else if(navigator.userAgent.indexOf('Firefox') !=-1)
					tagSideBar.style.paddingTop = "262px";//"225px";
				else
					tagSideBar.style.paddingTop = "255px";//"216px";
			}//end of else
		}//end of if
		else
		{
			if (navigator.userAgent.indexOf('MSIE') !=-1)
			{
				//checks which version of IE the user is using 7 or 6 or 8
				if(navigator.appVersion.indexOf('MSIE 7') != -1)
					tagSideBar.style.paddingTop = "297px";//"253px";
				else if(navigator.appVersion.indexOf('MSIE 8') !=-1)
					tagSideBar.style.paddingTop = "291px";//"253px";
				else
					tagSideBar.style.paddingTop = "298px";//"253px";
			}//end of if
			else
				tagSideBar.style.paddingTop = "291px";//"253px";
		}//end of if else
	}//end of window.onload=function()
}//end of sectionHome()