<!--
function openWin( windowURL, windowName, windowFeatures ) {
	// default to this dimension if no dimension specified
	if ( windowFeatures == "" ) {
		windowFeatures = "width=800,height=600,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=1,left=0, top=0"
	}
	var win = window.open( windowURL, windowName, windowFeatures ) ; 
	win.focus();
} 
// -->

<!-- start hiding script
// no popup window <select onChange="jumpHere( this, false )">
// with popup window <select onChange="jumpHere( this, true )">
function jumpHere (which, win)
{
	n = which.selectedIndex;
	var URL = which.options[which.selectedIndex].value;
	if (win){
		openWindow(URL);
	}
	else{
		window.location.href = URL;
	}
}
// end hiding scrupt --->

/*
function popup(Do)
{
	
	if(Do == 1)
	{
	
		var popurls=new Array();
		popurls[0]="http://www.sydneyroosters.com.au/popup.php";
		loadornot(popurls);
	}
	
}
function openpopup(popurl)
{
	var winpops=window.open(popurl,"","width=330,height=330")
}
*/

function get_cookie(Name) 
{
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) 
  {
    offset = document.cookie.indexOf(search)
    if (offset != -1) 
	{// if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
		end = document.cookie.length;
		returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

function loadornot(popurls)
{
	if (get_cookie('jkpopup')=='')
	{
		openpopup(popurls[Math.floor(Math.random()*(popurls.length))])
		document.cookie="jkpopup=yes"
	}
}

<!-- set to 0 or 1 depending on whether you want it to display -->
//popup(1); 
