// JavaScript Document
// used in the quicklinks select dropdown
function goHere(url) {
	window.open(url,'mywindow','width=900,height=700,resizable=yes, scrollbars=yes');

}

function loadNewURL(url) {
	window.location = url;

}
//shows status bar during upload process
 function Startupload(ID) {
  //pop up the status window
  winstyle="height=300,width=500,status=no,toolbar=no,menubar=no,top=150,left=110";
  window.open("progressbar.php?eventID=" + ID ,null,winstyle);
 }


function openWin(url,name) {
setCookie('checkcookie','check');
	if(getCookie('checkcookie')!= 'check')
	{
		alert('Cookies are not enabled in your browser. Browser Cookies are required to listen to streaming audio from Kansas Public Radio.\n\nTo enable cookies in Internet Explorer select the \"Tools\" menu -> Internet Options. Select the \"Privacy\" tab and then click the \"advanced\" button. Check the box to \"override automatic cookie handling\" and accept all cookies.\n\nTo enable cookies in Firefox select the \"Tools\" menu -> \"Options\", click on the \"Privacy\" tab and check the \"Accept cookies from sites\" checkbox.');
	}
	else
	{
		popupWin = window.open(url,name,'scrollbars=no,menubar=no,height=435,width=800,top=20,left=5,resizable=yes,toolbar=no,location=no,status=no');
	}
}


function openWin2(url,name) {
popupWin = window.open(url,name,'scrollbars=yes,menubar=no,height=400,width=500,top=20,left=200,resizable=yes,toolbar=no,location=no,status=no');
}

function getCookie( name ) {
	var start = document.cookie.indexOf( name + "=" );
	var len = start + name.length + 1;
	if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) {
		return null;
	}
	if ( start == -1 ) return null;
	var end = document.cookie.indexOf( ';', len );
	if ( end == -1 ) end = document.cookie.length;
	return unescape( document.cookie.substring( len, end ) );
}

function setCookie( name, value) {
     document.cookie = name+'='+escape( value );
}
