function openWindow(myURL, myName, myHeight, myWidth, scr, resize, toolbar,titlebar) 
		{
		comment_win=window.open(myURL,myName,"height="+myHeight+",width="+myWidth+",scrollbars="+scr+",resizable="+resize+",toolbar="+toolbar+",titlebar="+titlebar+"")
		//comment_win.moveTo(screen.width/2-350,screen.height/2-350)
		}

function checkForm(form)
{
	templen = form.SendFile.value.length
	tempvar = form.SendFile.value.substr(templen-5,5)
	tempvar = tempvar.toLowerCase()
  if(templen == "")n=1;
  else{
	if(tempvar.charAt(0) == ".")
	{
		tempvar = tempvar.substr(1,4)
		if(tempvar=="mpeg")
		{
			form.fileType.value = "mpg"
			return true
		}
		else if(tempvar=="jpeg")
		{
			form.fileType.value = "jpg"
			return true
		}
		else
		{
			alert("Please upload either a image file with a .jpg, .jpeg, or .gif extension \n or a video clip with a .mpeg or .mpg extension")
			return false
		}
	}
	else if(tempvar.charAt(1) == ".")
	{	
		tempvar = tempvar.substr(2,3)
		if(tempvar=="jpg" || tempvar=="mpg" || tempvar=="gif")
		{			
			form.fileType.value = tempvar
			return true
		}
		else
		{
			alert("Please upload either a image file with a .jpg, .jpeg, or .gif extension \n or a video clip with a .mpeg or .mpg extension")
			return false
		}
	}
	else
	{
		alert("Please upload either a image file with a .jpg, .jpeg, or .gif extension \n or a video clip with a .mpeg or .mpg extension")
		return false
	}
  }
}

//function to invoke Tip and UnTip mouseover events on any element - usses Walter Zorn's tool tip library
function set_tip(element_id,tip_title,tip_text){
	$("#"+element_id).mouseover(function () { 
		if(tip_title=="") Tip(""+tip_text+"",BGCOLOR,"#9CD9F7",BALLOON,true,ABOVE,true,LEFT,true,BALLOONSTEMOFFSET,-48,OFFSETX,-40);
		else Tip(""+tip_text+"",BGCOLOR,"#E6E6E6",TITLE,""+tip_title+"",BGCOLOR,'#9CD9F7',TITLEBGCOLOR,'#063455');
	});
	$("#"+element_id).mouseout(function () { 
		UnTip();
	});

}


//Highlight form element- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

var highlightcolor="lightyellow"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|OPTION/   //removed SELECT from this list as it was screwing up focus

//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}


