// Popup Imagen
function viewPic(img) {
	picfile=new Image(); picfile.src=(img); fileCheck(img); 
}

function fileCheck(img) {
	if((picfile.width!=0)&&(picfile.height!=0)) {
		makeWindow(img); }
	else {
		funzione="fileCheck('"+img+"')"; intervallo=setTimeout(funzione,10); 
		 }
}

function makeWindow(img) {
	ht=picfile.height+30; wd=picfile.width+20; 
	var args="height="+ht+",innerHeight="+ht;
	args+=",width="+wd+",innerWidth="+wd;
	if (window.screen) { 
		var avht=screen.availHeight; var avwd=screen.availWidth;
		var xcen=(avwd-wd)/2; var ycen=(avht-ht)/2;
		args+=",left="+xcen+",screenX="+xcen;
		args+=",top="+ycen+",screenY="+ycen+",resizable=yes";
	}
	return window.open(img,'',args);
}
	
// Agregar a Favoritos
function bookmarksite(title, url){
	if (document.all)
		window.external.AddFavorite(url, title);
	else if (window.sidebar)
		window.sidebar.addPanel(title, url, "")
}
