window.onload = loadHandler;
function loadHandler() {
	
if(document.getElementById('middle').firstChild) {
if (document.getElementById('middle').firstChild.tagName=='P') {
document.getElementById('middle').firstChild.className ='firstchild-ie'}

}}

	function theflash(movie,width,height) 
		{
		
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+width+'" height="'+height+'">\n');
		document.write('<param name="movie" value="'+movie+'">\n');
		document.write('<param name="quality" value="high" />\n');
		document.write('<param name="menu" value="false">\n');
		document.write('<param name="wmode" value="transparent">\n');
		document.write('<embed src="'+movie+'" width="'+width+'" height="'+height+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false" wmode="transparent"></embed>\n');
		document.write('</object>\n');
		
	}

	function toggleDiv(id,flagit) {
		if (flagit=="1"){
		document.getElementById(''+id+'').style.backgroundColor = '#E4E4E4';
		}
		else
		if (flagit=="0"){
		document.getElementById(''+id+'').style.backgroundColor = '';
		}
	}


	function showimage(dropdown,image)
		{
		document.getElementById(''+image+'').src= document.getElementById(''+dropdown+'').value
	}


	function textCounter(field,maxlimit) {
		
		document.getElementById(''+field+'').value = document.getElementById(''+field+'').value.substring(0, maxlimit);
		
	}

		var timex = 600
		var timey = 1
		
	function startClock(){
		timex = timex-timey
		setTimeout("startClock()", 1000)
		if(timex==0){
		alert("Your session is about to expire, please submit your page.");
		timex=10;
		}
	}
	

function checkALL(checkbox,what) {

 for (i=0;i<document.getElementsByName(''+what+'').length;i++)

   document.getElementsByName(''+what+'')[i].checked = checkbox.checked;

}

if (top.frames.length > 0)
    {
        top.location.href = location.href;
    }
