function gb_picture(Image,imgWidth,imgHeight) {
    var border = 18;
    var img = Image;
    var features;
    var w;
    var h;
    winWidth = (imgWidth<100) ? 100 : imgWidth+border;
    winHeight = (imgHeight<100) ? 100 : imgHeight+border;
    if (imgWidth+border > screen.width) {
        winWidth = screen.width-10;
        w = (screen.width - winWidth)/2;
        features = "scrollbars=yes";      
    } else {
        w = (screen.width - (imgWidth+border))/2;
    }
    if (imgHeight+border > screen.height) {
        winHeight = screen.height-60;
        h = 0;
        features = "scrollbars=yes";      
    } else {
        h = (screen.height - (imgHeight+border))/2 - 20;
    }
    winName = (img.indexOf("t_") == -1) ? img.substr(4,(img.length-8)) : img.substr(6,(img.length-10));
    features = features+',toolbar=no,width='+winWidth+',height='+winHeight+',top='+h+',left='+w;
    theURL = '$GB_PG[base_url]/picture.php?img='+Image;
    popup = window.open(theURL,winName,features);
    popup.focus();
}
function getEmail(email) {
		var stringPos = false;
		var stringEmail = "";
		if (email.length>0) {
			for (var i=0; i<email.length; i++) {	
				stringPos = (i % 2) ? false : true;
				if (stringPos == true) {
					stringEmail = stringEmail + "%" + email.charAt(i); 
				} else {
					stringEmail = stringEmail + email.charAt(i); 
				}
			}
			stringEmail = unescape(stringEmail);
			window.location.href = stringEmail;
		}
}



