/**
 * Show / Hide div
 */
function showDiv(divid) {
 if (document.layers) document.layers[divid].display='block';
 else document.getElementById(divid).style.display='block';
}

function hideDiv(divid) {
 if (document.layers) document.layers[divid].display='none';
 else document.getElementById(divid).style.display='none';
}

/* VIDEOPOPUP */
var currVideo="";

function sendEvent(swf,typ,prm) {
  thisMovie(swf).sendEvent(typ,prm);
};

function getUpdate(typ,pr1,pr2,swf) {
	//...
};

function thisMovie(swf) {
  if(navigator.appName.indexOf("Microsoft") != -1) {
    return window[swf];
  } else {
    return document[swf];
  }
};

function startVideo(videoID) {
	if (currVideo!="") {
		sendEvent('video'+currVideo,'stop');
		document.getElementById("videoPopup"+currVideo).style.display="none";
	}

	document.getElementById("videoPopup"+videoID).style.display="";
	//sendEvent('video'+videoID,'playpause');
	currVideo=videoID;
}

function closeVideo(videoID) {
	sendEvent('video'+currVideo,'stop');
	document.getElementById("videoPopup"+currVideo).style.display="none";
}

function getUpdate(typ,pr1,pr2,swf) { 
//  if(typ == 'state') { alert('the current state is: '+pr1); }
};

function initSelectBox(el,val) {
	if (el.length) {
		for (var i=0;i<el.length;i++)	{
			if (el[i].value==val)	{
				el[i].selected=true;
				break;
			}
		}
	}			
		
}
