
function goNav(link)
{
	document.location = link;
}

function ov(text)
{
	window.status = text;
}

function ou()
{
	window.status = "";
}



// media lib
var mediaLibWindow

function medialib(id)
{
	pageURL = "/mediaLib.asp?id=" + id;

	mediaLibWindow = window.open(pageURL,"mediaLib","width=200,height=200,left="+(screen.availWidth/2-200)+",top="+(screen.availHeight/2-200) );
	mediaLibWindow.focus();
}

function closeMediaLib()
{	if (window["mediaLibWindow"]!= null) { window["mediaLibWindow"].close(); }
}

//email
function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}



function rowOver(ID,tip)
{
	var di = document.getElementById("R" + ID)
	if (di!=null)
	{ 
		clsName = di.className
		if (clsName.substr(clsName.length - 2) != "ov")
		{
			di.className = di.className + "ov"
		}
	}

	var de = document.getElementById("D" + ID)
	if (de!=null)
	{
		de.style.display = "inline"
	}	
}

function rowOut(ID,tip)
{
	var di = document.getElementById("R" + ID)
	if (di!=null)
	{ 
		clsName = di.className
		
		if (clsName.substr(clsName.length - 2) == "ov")
		{
			di.className = clsName.substr(0,clsName.length - 2)
		}
	}

	var de = document.getElementById("D" + ID)
	if (de!=null)
	{
		de.style.display = "none"
	}
}


function nv2(id,tip)
{
	var di = document.getElementById(id)
	if (di!=null)
	{ 
		if (tip==1)
		{
			di.className = "nv2ov"
		}
		else
		{
			di.className = "nv2"
		}
	}
}

function mlu(id)
{
	var di = document.getElementById("ml" + id)
	if (di != null) di.className = "mlib1"
}

function mlo(id)
{
	var di = document.getElementById("ml" + id)
	if (di != null) di.className = "mlib2"
}

function galu(id)
{
	var di = document.getElementById("gal" + id)
	if (di != null) di.className = "gal1"
}

function galo(id)
{
	var di = document.getElementById("gal" + id)
	if (di != null) di.className = "gal2"
}




// cookies


function setCookie(c_name,value,expiredays)
{var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return "";
}



// popup movie

function showpop()
{
	setCookie("flpop","");
	flpop();

}

function flpop()
{
	if (getCookie("flpop") != "") return;

	poplayer = document.getElementById("poplayerbg")
	if (poplayer == null) return;
	poplayer.style.visibility = "visible"

	poplayer = document.getElementById("poplayerbg2")
	if (poplayer == null) return;
	poplayer.style.visibility = "visible"


	setCookie("flpop","1")
}


function cont()
{
	poplayer = document.getElementById("poplayerbg")
	if (poplayer == null) return;
	poplayer.style.visibility = "hidden"

	poplayer = document.getElementById("poplayerbg2")
	if (poplayer == null) return;
	poplayer.style.visibility = "hidden"

}


