/*
* All code written by Mark Branker
* for use on the website at http://www.ttosha.com/
* © 2008 Trinidad and Tobago Occupational Safety and Health Authority | All Rights Reserved
*/


// sub-menu functions


function homePage() {
	document.getElementById('subMenu').innerHTML = '<p>&nbsp;</p>';
}

function aboutUs() {
	document.getElementById('subMenu').innerHTML = '<a href="aboutUs.asp#mainContent" target="contentHolder">OSH Authority and OSH Agency</a><a href="#">Mission Statement</a><a href="#">Organisational Chart</a><a href="#">Code Of Ethics</a>';	
}

function eventsActivities() {
	document.getElementById('subMenu').innerHTML = '<a href="eventsActivities.asp#oshaLectureSeries" target="contentHolder">OSHA Lecture Series</a><a href="eventsActivities.asp#nationalSafetyAwards" target="contentHolder">National Safety Awards</a><a href="eventsActivities.asp#nationalSafetyWeek" target="contentHolder">National Safety Week</a>';
}

function reportAnAccident() {
	document.getElementById('subMenu').innerHTML = '<a href="assets/reportAnAccident.doc">Prescribed Form</a>';
}

function notifyOfOccupationalDisease() {
	document.getElementById('subMenu').innerHTML = '<a href="assets/notifyOfOccupationalDisease.doc">Prescribed Form</a>';
}

function howToSubmitAnOshComplaint() {
	document.getElementById('subMenu').innerHTML = '<p>&nbsp;</p>';
}

function tenderInformation() {
	document.getElementById('subMenu').innerHTML = '<p>&nbsp;</p>';
}


function notifyOfMajorConstructionActivity() {
	document.getElementById('subMenu').innerHTML = '<p>&nbsp;</p>';
}

function legal() {
	document.getElementById('subMenu').innerHTML = '<a href="assets/OSHA_Act_of_2004.pdf" target="_blank">OSH Act</a><a href="#">OSH Regulations</a><a href="#">OSH Standards</a><a href="#">OSH Codes of Practice</a><a href="legal.asp#legalNotices" target="contentHolder">Legal Notices</a><a href="assets/Draft_Hoists_and_Lifts_Regulations.pdf" target="_blank">Draft Hoists and Lifts Regulations</a><a href="assets/FOI_Statement_2009.pdf" target="_blank">FOIA Statement</a>'; 
}

function legalDuties() {
	document.getElementById('subMenu').innerHTML = '<a href="legalDuties.asp#mainContent" target="contentHolder">Employers and Occupiers</a><a href="legalDuties.asp#employees" target="contentHolder">Employees</a><a href="legalDuties.asp#importersDesignersSuppliers" target="contentHolder">Importers, Designers, Suppliers</a>';
}

function jobVacancies() {
	document.getElementById('subMenu').innerHTML = '<p>&nbsp;</p>';
}

function internationalConventions() {
	document.getElementById('subMenu').innerHTML = '<p>&nbsp;</p>';
}

function media() {
	document.getElementById('subMenu').innerHTML = '<a href="media_safetyAwards2010.asp" target="contentHolder">National Safety Awards 2010</a><a href="media_safetyAwards2009MediaLaunch.asp" target="contentHolder">National Safety Awards 2009 media launch</a><a href="media_safetyAwards2008MediaLaunch.asp" target="contentHolder">National Safety Awards 2008 media launch</a><a href="media_contractorsSymposium2009.asp" target="contentHolder">Contractor Symposium 2009</a><a href="impersonation_of_inspectors.asp" target="contentHolder">Impersonation of inspectors</a>';
}

function oshaPublications() {
	document.getElementById('subMenu').innerHTML = '<a href="oshaPublications.asp#oshaActivityBooklet" target="contentHolder">OSHA Activity Booklet</a><a href="oshaPublications.asp#otherPublications" target="contentHolder">Other Publications</a>';
}

function otherLinks() {
	document.getElementById('subMenu').innerHTML = '<a href="otherLinks.asp#mainContent" target="contentHolder">Stakeholders</a><a href="otherLinks.asp#oshWebsites" target="contentHolder">OSH Websites</a><a href="otherLinks.asp#internationalOshInstitutions" target="contentHolder">OSH Institutions</a>';	
}

function contactUs() {
	document.getElementById('subMenu').innerHTML = '<p>&nbsp;</p>';
}

function frequentlyAskedQuestions() {
	document.getElementById('subMenu').innerHTML = '<p>&nbsp;</p>';
}

function calendar2009() {
	document.getElementById('subMenu').innerHTML = '<a href="calendar2009/m0.asp" target="contentHolder">January</a><a href="calendar2009/m1.asp" target="contentHolder">February</a><a href="calendar2009/m2.asp" target="contentHolder">March</a><a href="calendar2009/m3.asp" target="contentHolder">April</a><a href="calendar2009/m4.asp" target="contentHolder">May</a><a href="calendar2009/m5.asp" target="contentHolder">June</a><a href="calendar2009/m6.asp" target="contentHolder">July</a><a href="calendar2009/m7.asp" target="contentHolder">August</a><a href="calendar2009/m8.asp" target="contentHolder">September</a><a href="calendar2009/m9.asp" target="contentHolder">October</a><a href="calendar2009/m10.asp" target="contentHolder">November</a><a href="calendar2009/m11.asp" target="contentHolder">December</a><a href="calendar2009/m12.asp" target="contentHolder">January</a>';	
}

function calendarMonth() {
	var today=new Date();
	var thisMonth=today.getMonth();
	
	window.contentHolder.location = 'calendar2009/m' + thisMonth + '.asp';
}

function oshAwards2009() {
	document.getElementById('subMenu').innerHTML = '<a href="oshAwards2009.asp" target="contentHolder">About the National Safety Awards 2009</a><a href="oshAwards2009.asp#HowToEnter" target="contentHolder">How to Enter</a><a href="oshAwards2009.asp#JudgingCriteria" target="contentHolder">Judging Criteria</a><a href="oshAwards2009.asp#TermsAndConditions" target="contentHolder">Terms and Conditions</a>';
}


	// iframe resize function
	

function resizeContentHolder() {
	var headerHeight = document.getElementById("header").height;
	
	if(document.documentElement.clientHeight) // if browser is Internet Explorer
		document.getElementById('contentHolder').height=document.documentElement.clientHeight - headerHeight;
	else
		document.getElementById('contentHolder').height=window.innerHeight - headerHeight;
}

	// primary menu function
	

var lastSelection="homePage";

function indicator(selection) {
	var selectionFunction = eval(selection);
	var deselect = document.getElementById(lastSelection);
	var newSelection = document.getElementById(selection);
	
	deselect.style.backgroundColor = "";
	newSelection.style.backgroundColor = "#000000";
	lastSelection = selection;
	
	selectionFunction();
}


	// end