
var popwinprops = ",toolbar:no,menubar:no,scrollbars:no,resizable:no,status:no";
//var popwinprops = "width=100,height=100";
var popwinname = 'popw';
var popcnt = 0;
var popphotocnt =0;
var popwin;
var photowin;


function popaux(url)
{
alert("popaux "+url);
window.open(url,'aux',"width=500,height=500,resizable=yes");
}

var photowinprops = "width=650,height=500,location=0,toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0";
var auxprops = "width=650,height=500,location=1,toolbar=1,menubar=1,scrollbars=1,resizable=1,status=1";

function poppage(url1,wnp1)
{
//   alert("url ="+url1+"|");
//   alert("wnp ="+wnp1+"|");
//   if (popcnt > 0) popwin.close();
//   popcnt++;
  if ((wnp1 == "") || simplePop) 
     {
	 popwin = window.open(url1,"aux",auxprops);
     setTimeout('poppage_1()',10);
	 }
  else
     {
      if (popcnt > 0) popwin.close();
	  popcnt++;
    popwin =window.showModelessDialog(url1,"",wnp1);
	}
//     popwin =window.showModelessDialog(url1,"","dialogWidth=100px;dialogHeight=100px");
}

function popphoto(url1,wnp1)
{
//   alert("popphoto|"+simplePop+"|"+url1+"|");
  if ((wnp1 == "") || simplePop) 
     {
//	 alert("hoob");
	 photowin = window.open(url1,"photo",photowinprops);
     setTimeout('popphoto_1()',10);
	 }
  else
     {
     if (popphotocnt > 0) photowin.close();
	  popphotocnt++;
    photowin =window.showModelessDialog(url1,"",wnp1);
	}
}


function popphoto_1() {
//	popcnt++;
	photowin.focus();
}


function poppage_1() {
//	popcnt++;
	popwin.focus();
}

function poppage1(url)
{
 // alert('poppage1 '+url);
   poppage(url,"");
}


//var infowinprops = "width=550,height=420,location=0,toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0";
var infowinprops = "dialogWidth:600px;dialogHeight=520px";
	var infowinname = 'infowin';


	function launchInfo(url) {
//	alert("launchinfo "+url);
  if (simplePop)
    popphoto(url,"");
  else
    window.showModelessDialog(url,"",infowinprops);
//		infowin =window.open(url,infowinname,infowinprops);
//		setTimeout('infowin.focus();',500);
	}


function getinfo() 
{ 
var tmp; 
//alert("getinfo NOW");
tmp = 'about.html';
//alert(tmp);
launchInfo(tmp);
}

function jumpto(url) 
{ 
//alert('jumpto '+url);
window.location.href = url;
}

function getdirections() 
{ 
window.location.href = "http://www.directionsmag.com/events/";
}



