


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function P7_hideDiv(evt) { //v1.2 by PVII
 var b,relT,mT=false; 
 if(document.layers){b=evt.target;if(b.p7aHide){
  b.visibility="hidden";}else{routeEvent(evt);}
 }else if(document.all&&!window.opera){b=event.srcElement;
  while(b!=null){if(b.tagName=="DIV" && b.p7ahD){mT=true;break;}b=b.parentElement;}
  if(!b.contains(event.toElement)){b.style.visibility="hidden";}
 }else if(document.getElementById){b=evt.currentTarget;relT=evt.relatedTarget;
  while(relT!=null){if(b==relT){mT=true;break;}
  relT=relT.parentNode;}if(!mT){b.style.visibility="hidden";}}
}

function P7_autoHide() { //v1.2 by PVII
 var i,g,args=P7_autoHide.arguments;
 for(i=0;i<args.length;i++){if((g=MM_findObj(args[i]))!=null){
  g.p7aHide=true;if(document.layers){
  g.captureEvents(Event.MOUSEOUT);}g.onmouseout=P7_hideDiv;g.p7ahD=true;}}
}

function P7_autoLayers() { //v1.2 by PVII
 var g,b,k,f,args=P7_autoLayers.arguments;
 var a = parseInt(args[0]);if(isNaN(a))a=0;
 if(!document.p7setc) {p7c=new Array();document.p7setc=true;
  for (var u=0;u<10;u++) {p7c[u] = new Array();}}
 for(k=0; k<p7c[a].length; k++) {
  if((g=MM_findObj(p7c[a][k]))!=null) {
   b=(document.layers)?g:g.style;b.visibility="hidden";}}
 for(k=1; k<args.length; k++) {
  if((g=MM_findObj(args[k])) != null) {
   b=(document.layers)?g:g.style;b.visibility="visible";f=false;
   for(j=0;j<p7c[a].length;j++) {
    if(args[k]==p7c[a][j]) {f=true;}}
  if(!f) {p7c[a][p7c[a].length++]=args[k];}}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function validateSelEducation()
{
	if (document.getElementById("selEducation"))
	{
		if (document.getElementById("selEducation").value == "0")
		{
			document.getElementById("selEducationOther").innerHTML="<BR><input type=text name=txtEducationOther class=reg_items1 value=''>";
		
		}
		else
		{
			document.getElementById("selEducationOther").innerHTML="";
		}
	
	}
}
function validateSelProf()
{
	if (document.getElementById("selProf"))
	{
		
		if (document.getElementById("selProf").value == "0")
		{
			document.getElementById("selProfOther").innerHTML="<BR><input type=text name=txtProfOther class=reg_items1 value=''>";
		
		}
		else
		{
			document.getElementById("selProfOther").innerHTML="";
		}
	
	}
}
function validateSelOrg()
{
	if (document.getElementById("selOrg"))
	{
		
		if (document.getElementById("selOrg").value == "0")
		{
			document.getElementById("selOrgOther").innerHTML="<BR><input type=text name=txtOrgOther class=reg_items1 value=''>";
		
		}
		else
		{
			document.getElementById("selOrgOther").innerHTML="";
		}
	
	}
}

	function borderMouseover(id) {
		var dashSpot= id.lastIndexOf("_");
		if (document.getElementById(id.substring(0,dashSpot+1) + "divBorder")) {
			document.getElementById(id.substring(0,dashSpot+1) + "divBorder").style.borderColor ="#8D0022";
		}
	}
	function borderMouseout(id) {
		var dashSpot = id.lastIndexOf("_");
		if (document.getElementById(id.substring(0,dashSpot+1) + "divBorder")) {
			document.getElementById(id.substring(0,dashSpot+1) + "divBorder").style.borderColor ="#FBF698";
		}
	}
	
	function checkField(id) {
	    var aspnetID;
	    if (document.getElementById(id).value == 0) {
	            aspnetID = id.replace("_","$");
	            aspnetID = aspnetID.replace("_","$");
          	    setTimeout('WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("' + aspnetID + '", "", false, "", "", true, true))', 0);
	    }
	    else {
	        if (document.getElementById(id.replace("ddl","txt"))) {
	            aspnetID = id.replace("_","$");
	            aspnetID = aspnetID.replace("_","$");
	            setTimeout('WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("' + aspnetID + '", "", false, "", "", true, true))', 0);
	        }
	    }
	    
	}
    function stopOthers(dontStop) {
        if (document.getElementById("PlayerChannel01") && (dontStop != 1)) {
            document.getElementById("PlayerChannel01").controls.stop();
        }
        if (document.getElementById("PlayerChannel02") && (dontStop != 2)) {
            document.getElementById("PlayerChannel02").controls.stop();
        }
        if (document.getElementById("PlayerChannel03") && (dontStop != 3)) {
            document.getElementById("PlayerChannel03").controls.stop();
        }
    }
	function CreateControl(DivID, CLSID, ObjectID, WIDTH, HEIGHT, URL, AUTOSTART, showCaptioning, uiMode)
	{
	  var d = document.getElementById(DivID);
	  
	  d.innerHTML = '<object classid="' + CLSID + '" id="' + ObjectID + '" width=' + WIDTH + ' height=' + HEIGHT +'><param name="URL" value="' + URL + '" /><param name="autoStart" value=' + AUTOSTART + ' /><param name="ShowCaptioning" value="' + showCaptioning + '" /><param name="uiMode" value="' + uiMode + '" /><EMBED type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" id="' + ObjectID + '" name="' + ObjectID + '"  autosize="' + AUTOSTART + '" ShowCaptioning="' + showCaptioning + '" uiMode="' + uiMode +'" width="' + WIDTH + '" height="' + HEIGHT + '" src="' + URL + '" autostart="1" loop="0" autoresize="1"></embed></object>';
	  //d.innerHTML += '
	  
	  //alert(d.innerHTML);
	  //alert(document.getElementById(ObjectID));

	  
}
	


