function popup(what, scroll, width, height)
{
	window.open(what,"","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=" + scroll + ",resizable=no,width=" + width + ",height=" + height);
}


function popupMax(what){//, scroll) {
  if (window.screen) {
    var aw = screen.availWidth;
    var ah = screen.availHeight;
    //window.open(what,"WindowName","toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=" + scroll + ",resizable=yes,width=" +aw+",height="+ah);
    window.open(what,"WindowName");
    
   // window.moveTo(0, 0);
   // window.resizeTo(aw, ah);
    
  }
}

function PopupLink(what) {
	popupExtern(what);
}

function popupExtern(what) {
	pagina = open("","WindowNaam","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=no,width=794,height=572");
	html =  '<HTML><HEAD><TITLE>Smaak</TITLE></HEAD><BODY LEFTMARGIN="0" TOPMARGIN="0" RIGHTMARGIN="0" BOTTOMMARGIN="0">';
	html += '<TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0" WIDTH="100%" HEIGHT="100%"><TR><TD WIDTH="100%" HEIGHT="25px">';
	html += '<table width="794" height=100% cellspacing="0" cellpadding="0" border="0">' +
		'<tr valign="top" width="794">' +
		'<td style="background-color:#FFCC66;border-bottom:solid 1px #834E0D" align="left" valign="bottom">&nbsp;<img src="' + document.all.tags('BASE')[0].href + 'images/pic/pic_popupextern_top.gif">&nbsp;</td>' +
		'<td style="background-color:#FFCC66;border-bottom:solid 1px #834E0D" align="right" valign="bottom" class="cright" style="FONT-SIZE: 11px;">U bezoekt een site buiten de Smaak-website. Om terug te keren naar de Smaak-website moet u dit venster sluiten.&nbsp; </td>' +
		'</tr></table>';
	html += '</TD></TR><TR><TD WIDTH="100%" HEIGHT="100%">';
	html += '<IFRAME WIDTH="100%" HEIGHT="100%" FRAMEBORDER="0" MARGINHEIGHT="0" MARGINWIDTH="0" SRC="' + what + '">';
	html += '</TD></TR></TABLE></BODY></HTML>';
	pagina.document.open();
	pagina.document.write(html);
	pagina.document.close();
}

 function expand(obj)
  {
  	nextObj = obj.nextSibling;
  	if (nextObj.style.display == 'block')
  	{
  		obj.style.backgroundColor = '#FFFFFF';
  		obj.style.border = 'solid 1px white';
  		nextObj.style.display = 'none';
  		obj.children[0].src = obj.children[0].src.replace('_2', '_1');
  	}
  	else
  	{
  		obj.style.backgroundColor = '#FDFDFD';
  		obj.style.borderBottom = 'solid 1px #FDFDFD';
  		obj.style.borderTop = 'solid 1px #FDFDFD';
  		obj.style.borderLeft = 'solid 1px #FDFDFD';
  		obj.style.borderRight = 'solid 1px #FDFDFD';
  		nextObj.style.display = 'block';
  		obj.children[0].src = obj.children[0].src.replace('_1', '_2');
  	}
  }
 
function SendToFriend(rowName, ecardUrl) {
  var html = document.all[rowName].innerHTML;
  var frm = document.forms["stfform"]
  if (frm == null) {
    frm = document.createElement("form");
    frm.method = "post";
    if (ecardUrl == null) ecardUrl = "member/ecard.aspx";
    frm.action = ecardUrl;
    frm.appendChild(document.createElement("<input type='hidden' name='htmltext'>"));
    document.body.appendChild(frm);
  }
  frm.childNodes[0].value = html;
  frm.submit();
}

function getYear()
{
    var date = new Date();
    return date.getFullYear();
}