var newWin = null; 
function popUp(strURL, strType, strHeight, strWidth) { 
 if (newWin != null && !newWin.closed) 
   newWin.close(); 
 var strOptions=""; 
 if (strType=="mediaplayer") 
   strOptions="height="+strHeight+",width="+strWidth;
 if (strType=="terms") 
   strOptions="scrollbars,"+"resizable,height="+strHeight+",width="+strWidth;
 if (strType=="address") 
   strOptions="height="+strHeight+",width="+strWidth; 
 newWin = window.open(strURL, 'newWin', strOptions); 
 newWin.focus(); 
}
function addinput()
{
var element = document.createElement( 'input' );
element.type = 'text';
element.name = 'text2';
element.value = '';
document.form1.appendChild( element );
}

function submitform()
{
  document.form1.submit();
}

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;
}
/*controls the navigation drop down display*/
var isIE=document.all?true:false;
var isDOM=document.getElementById?true:false;
var isNS4=document.layers?true:false;

/* _w : which ID (1) or (2) */
/* _h : (h)ide or (s)how */
function toggleT(_w,_h) {
  if (isDOM)
  {
    if (_h=='s') document.getElementById(_w).style.display='block';
    if (_h=='h') document.getElementById(_w).style.display='none';
  }
  else if (isIE) {
    if (_h=='s') eval("document.all."+_w+".style.display='block';");
    if (_h=='h') eval("document.all."+_w+".style.display='none';");
  }
  else if(isNS4)
  {
    if (_h=='s') eval("document.layers['"+_w+"'].display='block';");
    if (_h=='h') eval("document.layers['"+_w+"'].display='none';");
  }
}

function addvote(type,option){
if (isDOM)
  {document.getElementById(type).value=option;
 }
  else if (isIE) {
	eval("document.all."+type+".value="+option+";");
	}
  else if(isNS4)
  {
    eval("document.layers['"+type+"'].display='"+option+"';");
}
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}


