//popup.js, Salim Dirani, 12/juns/2006
//
//What does this function?
//
//Call this function on an anchor link and specify the appropriat 
//parameter(url of the image, width, height and a text description 
//that will appear under the image the text description can contain html.
//
//Example
//
//<a href="javascript:popup('images/AdelImam.jpg', 380, 450, 'Here is the 
//famous Adel Imame side by side with Mr Edmond Boutros')">Adel Imame</a>

function popup(url, width, height, msg, msg2){
var newWind = window.open(url, 'bPro',"width="+width+",height="+height+",resizable");

if(msg){
var output = "";
output += "<html><body>";
output += "<img src='"+ url +"' />";
output += "<p><a href='http://"+msg+"' target='_blank'>"+msg+"</a></p>";
output +="</body></html>";
newWind.document.write(output);
}

if(msg2){
	var output = "";
output += "<html><body>";
output += "<p>"+msg2+"</p>";
output +="</body></html>";
newWind.document.write(output);
}

newWind.focus();
}
