function getImage(what) {
  var w = 600;
  var h = 750;
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
  win=window.open('/images/' + what,'',settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

function getW(what, w, h) {

  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',scrollbars=yes';
  win=window.open(what,'',settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

function launchframe(which, type, connection, media) {
      newwin = window.open("media_frame.aspx?movie=" + which + "&type_=" + type + "&connection=" + connection + "&media=" + media, "view","fullscreen=no, scrollbars=no");
}

var win= null;
function launchHelp(){
  var w = 800;
  var h = 625;
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
  win=window.open("helppage.swf","helper",settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}


function getVideo() {
  var w = 500;
  var h = 380;
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
  win=window.open('http://www.pinks.tv/banner/vPlayer.html','PINKS',settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}


function getVideo2(which) {
  var w = 500;
  var h = 450;
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
  win=window.open('media.aspx?url=' + which,'Sundance_Media',settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

function confirmDelete(varURL)
{
    if (confirm("Are you sure you want to delete this Listing?")) {
        window.location.href = varURL;
        return true;
    } else {
    window.location.reload();
    }

}

function getProject(which) {
  var w = 800;
  var h = 600;
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
  win=window.open(which,'PULLIN.tv',settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

function Screen (){
	//if (MediaPlayer.playState == 3) {
    	document.MediaPlayer.DisplaySize=3;
    	//}
}
function realFullScreen () {
	document.realOne.SetFullScreen();
}

function ShutMeDown () {
    MediaPlayer.controls.stop();
}


 function doTopNav() {
  	var navTag = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="800" height="140" id="admin_nav" align="middle">'
  	+ '<param name="allowScriptAccess" value="sameDomain" />'
  	+ '<param name="movie" value="admin_nav.swf" />'
  	+ '<param name="quality" value="high" />'
  	+ '<param name="wmode" value="transparent" />'
  	+ '<param name="bgcolor" value="#ffffff" />'
  	+ '<embed src="admin_nav.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="800" height="140" name="admin_nav" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
  	document.write(navTag);
 }

function go() {

	document.forms[0].submit();
	/*box = document.forms[0].filter;
	destination = box.options[box.selectedIndex].value;
	if (destination) location.href = destination; */
}

function adjustAffl() {
	//var affl = document.forms[0].affiliationtype;
	//var affltype = affl.options[affl.selectedIndex].value;
	var affltype = document.getElementById( "affiliationtype" ).value;
	if (affltype == "email") {
		document.getElementById( "affiliation" ).value = "PLATFORM Newsletter";
		document.getElementById( "affiliation" ).blur();
	} else if (affltype == "volunteer" || affltype == "staff" || affltype == "passholder" || affltype == "jury") {
		document.getElementById( "affiliation" ).value = "PLATFORM FESTIVAL";
		document.getElementById( "affiliation" ).blur();
	} else {
		document.getElementById( "affiliation" ).value = "";
		document.getElementById( "affiliation" ).focus();
	}
}

function confirmDelete(varURL) {
    if (confirm("Are you sure you want to delete this Listing?")) {
        window.location.href = varURL;
        return true;
    } else {
    window.location.reload();
    }

}

function confirmDeleteAffl(varURL) {
    if (confirm("Are you sure you want to delete this Affiliation?")) {
        window.location.href = varURL;
        return true;
    } else {
    window.location.reload();
    }

}


function confirmLock(varURL) {
    if (confirm("Are you sure you want to LOCK this record?")) {
        window.location.href = varURL;
        return true;
    } else {
    window.location.reload();
    }

}

function confirmLockALL(varURL) {
    if (confirm("Are you sure you want to LOCK ALL?")) {
        window.location.href = varURL;
        return true;
    } else {
    window.location.reload();
    }

}

function  drawFLASH(which, vars, color, w, h) {
	var watchTag = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
	+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"'
	+ 'id="game" width="' + w + '" height="' + h + '">'
	+ '<param name="movie" value="' + which + '"></param>'
	+ '<param name="quality" value="high"></param>'
	+ '<param name="bgcolor" value="' + color + '"></param>'
	+ '<param name="flashvars" value="' + vars + '"></param>'
	+ '<embed src="' + which + '" quality="high" bgcolor="' + color + '"  width="' + w + '" height="' + h + '" flashvars="' + vars + '" type='
	+ '"application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>';
	document.write(watchTag);
}

function  drawTrnspFLASH(which, vars, color, w, h, id) {
	var Tag = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + w + '" height="' + h + '" id="' + id + '" align="middle">'
	+ '<param name="allowScriptAccess" value="sameDomain" />'
	+ '<param name="flashvars" value="' + vars + '"></param>'
	+ '<param name="movie" value="' + which + '" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="' + which + '" quality="high" wmode="transparent" bgcolor="' + color + '" width="' + w + '" height="' + h + '" name="' + id + '" align="middle" allowScriptAccess="sameDomain"  flashvars="' + vars + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
	+ '</object>';
	document.write(Tag);
}

