function luluAFriend(URL){	
    var browser = navigator.appName;
    var width = 400;
   	var height = 400;
    swidth = ((screen.width/2)-(width/2));
    sheight = ((screen.height/2)-(height/2));
	newWin = window.open('/lulu_friend?url='+URL,'lulu_friend','width='+ width +',height='+ height +',screenY='+ sheight +',screenX='+ swidth +',top=' + sheight + ',left=' + swidth + ',resizeable=no,scrollbars=no');
    newWin.focus();
	}
	
// LULUZINE POP-UP =================================================================

function luluzine_popup(path, issue_id, volume, issue, chapter, story_id)
{
  width = screen.availWidth;
  height = screen.availHeight;
  swidth = (0);
  sheight = (0);
  newWin = window.open(path + '/index.php?issue_id=' + issue_id + '&vol=' + volume + '&issue=' + issue + '&chapter=' + chapter + '&story_id=' + story_id, "luluzine", 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width='+width+',height='+height+',screenY='+ sheight+',screenX='+swidth+',top='+sheight+',left='+swidth);
  
  //alert(path + '/index.php?issue_id=' + issue_id + '&vol=' + volume + '&issue=' + issue + '&chapter=' + chapter + '&story_id=' + story_id);
  newWin.focus();
}

// Ambassador Image popup =================================================================

function amb_image(id, width, height)
{
    swidth = ((screen.width/2)-(width/2));
    sheight = ((screen.height/2)-(height/2));

	newWin = window.open('/stores/_ambassadors/index.php?image_id='+id ,'ambassador','width='+ width +',height='+ height +',screenY='+ sheight +',screenX='+ swidth +',top=' + sheight + ',left=' + swidth + ',resizable=yes,scrollbars=no');

    newWin.focus();
}

// URL popup =================================================================

function popWin(url, width, height)
{
    swidth = ((screen.width/2)-(width/2));
    sheight = ((screen.height/2)-(height/2));

	newWin = window.open(url ,'luluWin','width='+ width +',height='+ height +',screenY='+ sheight +',screenX='+ swidth +',top=' + sheight + ',left=' + swidth + ',resizable=yes,scrollbars=no');

    newWin.focus();
} 

function popanyWin(i,w,h){
var anyWin
var features ='width='+ w +',height='+ h+',status = no, toolbar = no, location=no,left=0,top=0,scrollbars=yes' ;
if(!anyWin || anyWin.closed) {anyWin=window.open(i,"anyWin",features)}
else {anyWin.location=i}
anyWin.focus()
}