activateMenu = function(nav) 
{
    /* currentStyle restricts the Javascript to IE only */
        if (document.all && document.getElementById(nav)) { 
        var navroot = document.getElementById(nav);
        
        /* Get all the list items within the menu */
        var lis=navroot.getElementsByTagName("LI");  
        for (i=0; i<lis.length; i++) {
	
                lis[i].onmouseover=function() {
		    if (this.className != "nohref")
                        this.className="over";
                }
                lis[i].onmouseout=function() {
		    if (this.className != "nohref")
                        this.className=this.className.replace("over", "");
                }
           /* If the LI has another menu level */
            if(lis[i].lastChild.tagName=="UL"){
            
                /* assign the function to the LI */
                lis[i].onmouseover=function() { 
                
                   /* display the inner menu */
                    this.lastChild.style.display="block";
		    if (this.className != "nohref")
            	    this.className="over";
                }
                lis[i].onmouseout=function() {                       
                    this.lastChild.style.display="none";
		    if (this.className != "nohref")
                    this.className=this.className.replace("over", "");
                }
            }
        }
    }
}
function clearMe()
{
    alert('clearing');
}
function menu_over (name)
{
    var img = document.getElementById("img_" + name);
    img.src = "../images/menu_" + name + "_over.png";
}

function menu_out (name)
{
    var img = document.getElementById("img_" + name);
    img.src = "../images/menu_" + name + "_off.png";
}

function menu_item_over (name)
{
    var img = document.getElementById("img_item_" + name);
    img.src = "../images/menu/" + name + "_over.png";
}

function menu_item_out (name)
{
    var img = document.getElementById("img_item_" + name);
    img.src = "../images/menu/" + name + ".png";
}


doc  = document;
if (document.all)
{
    doc = document.all;
}

function changeImages() 
{
   if (document.images) 
   {
        for (var i=0; i<changeImages.arguments.length; i+=2) 
        {
           doc[changeImages.arguments[i]].src = changeImages.arguments[i+1];
        }
   }
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function linkMenu(selObj){    
  if(selObj.options[selObj.selectedIndex].value)
	  window.open (selObj.options[selObj.selectedIndex].value);
  selObj.selectedIndex=0;
  return false;
}

function switchStyles(action){
    if (action == 'on'){
        document.getElementById('s1').style.color='#CC0000';
        document.getElementById('s2').style.color='#FFF';
    }else{
        document.getElementById('s1').style.color='#FFF';
        document.getElementById('s2').style.color='#CC0000';
    }
}

function switchStyles2(action){
    if (action == 'on'){
        document.getElementById('t1').style.color='#FFF';
        document.getElementById('t2').style.color='#CC0000';
    }else{
        document.getElementById('t1').style.color='#0099FF';
        document.getElementById('t2').style.color='#CCC';
    }
}

function switchStyles3(action){
    if (action == 'on'){
        document.getElementById('b1').style.color='#FFF';
        document.getElementById('b2').style.color='#CC0000';
    }else{
        document.getElementById('b1').style.color='#0099FF';
        document.getElementById('b2').style.color='#CCC';
    }
}

function clickClear(thisfield, defaulttext){
    //alert('hiya');
    if (thisfield.value == defaulttext) {
		thisfield.value = "";
	}
}

function clickReplace(thisfield, defaulttext){
    alert('hiya2');
    if (thisfield.value == "") {
		thisfield.value = defaulttext;
	}
}

// popup class
var popper =
{
	width:Number,
	height:Number,
	url:String,
	wName:String,
	hresize:Boolean,
	hscroll:Boolean,
	x:Number,
	y:Number,
	hfocus:Boolean,
	
	show:function()
	{
		var hscroll = popper.hscroll === true ? 'yes' : 'no';
		var hresize = popper.hresize === true ? 'yes' : 'no';
		
		if (popper.x < 0)
		{
			if (window.screen)
			{
				if ((navigator.appVersion.indexOf("Mac") != -1) && ((navigator.appName === "Netscape") && !(navigator.userAgent.indexOf('Safari') != -1)))
				{
					popper.x = (screen.width - popper.width) / 2;
				} else {
					popper.x = (screen.availWidth - popper.width) / 2;
				}
			} else {
				popper.x = 0;
			}
		}
		
		if (popper.y < 0)
		{
			if (window.screen)
			{
				if ((navigator.appVersion.indexOf("Mac") != -1) && ((navigator.appName == "Netscape") && !(navigator.userAgent.indexOf('Safari')!= -1)))
				{
					popper.y = (screen.height - popper.height) / 2;
				} else {
					popper.y = (screen.availHeight - popper.height) / 2;
				}
			} else {
				popper.y = 0;
			}
		}
		
		var wnd = open(popper.url, popper.wName, 'width=' + popper.width
							  + ',height='+ popper.height
							  + ',screenX=' + popper.x
							  + ',screenY=' + popper.y
							  + ',top=' + popper.y
							  + ',left=' + popper.x
							  + ',resizable=' + hresize
							  + ',scrollbars=' + hscroll);
		if (this.hfocus)
		{
			wnd.focus();
		}
		
		return wnd;
	}
}

function updatePop()
{
    popper.width = 710;
    popper.height = 544;

    popper.url = '/updateform_talent.aspx';
	popper.wName = 'update1';
	popper.hresize = false;
	popper.hscroll = true;
	popper.x = -1;
	popper.y = -1;

    popper.show();
}

function updatePop2()
{
    popper.width = 674;
    popper.height = 444;

    popper.url = '/updateform_other.aspx';
	popper.wName = 'update2';
	popper.hresize = false;
	popper.hscroll = true;
	popper.x = -1;
	popper.y = -1;

    popper.show();
}

function confirmPop() 
{
    var winwidth=400
    var winheight=290
    if (window.screen) 
    {
        if ((navigator.appVersion.indexOf("Mac") != -1) && ((navigator.appName == "Netscape") && !(navigator.userAgent.indexOf('Safari')!= -1))) 
        {
			window.innerWidth = winwidth
			window.innerHeight = winheight
			window.screenX = (screen.availWidth-winwidth)/2;
			window.screenY = (screen.availHeight-winheight)/2;
			window.name='confirmwin';
        } else {
			var ww = (screen.availWidth - winwidth)/2;
			var wh = (screen.availHeight - winheight)/2;
			window.moveTo(ww, wh);
			window.resizeTo(winwidth, winheight);
			window.name='confirmwin';
        }
    } else {
		window.resizeTo(winwidth, winheight);
		window.name='confirmwin';
    }
}

function videoPop(id)
{
	popper.width = 360;
    popper.height = 436;

    popper.url = '../Pages/talent_video.aspx?id=' + id;
	popper.wName = 'talent_video';
	popper.hresize = false;
	popper.hscroll = false;
	popper.x = -1;
	popper.y = -1;

    popper.show();
}

function audioPop(id)
{
	popper.width = 360;
    popper.height =200;

    popper.url = '../Pages/talent_audio.aspx?id=' + id;
	popper.wName = 'talent_audio';
	popper.hresize = false;
	popper.hscroll = false;
	popper.x = -1;
	popper.y = -1;

    popper.show();
}
