/*
	SCRIPT.JS
	Autor: Gustavo F. D'Arielli
*/

document.oncontextmenu = right;

function right(e) {
	return false;	
}

/*function doModalImage( param )
{
   var strFeatures = "dialogWidth:800px;dialogHeight:600px;" + 
   					"help:no;maximize:no;minimize:no;scrollbars:no;status:no;center:yes;status:no";
 
//   var cRetValue=showModalDialog( url, param, strFeatures );
	   showModelessDialog( '../Pages/MostrarImagen.htm', param, strFeatures );
  // if (cRetValue != null)
//   {
//      alert(cRetValue);
//   }
}
*/
/*function doDialogImage(imageName,imageWidth,imageHeight,alt,posLeft,posTop) 
{
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>'); 
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}*/

var newWind;
var lOpened=false;
function openWindowImage( cPicture,nWidth,nHeight,cMessage,nBorder ){
		 var output;
		if (lOpened){
		   //newWind.close();
		}
		if ( cMessage == '' )
			cMessage = 'www.andream.com.ar' ;
		if ( nWidth == 0 )
			nWidth = 700;
		if ( nHeight == 0 )
			nHeight = 500;
		lOpened=true;
		 newWind=window.open("","winnam","HEIGHT="+nHeight+",WIDTH="+nWidth+",scrollbars=yes,resizable=no,top=5,left=5");
		 output="<HTML>"
		 output+="<meta http-equiv=\"imagetoolbar\" content=\"no\">"
		 output+="<script LANGUAGE=\"JavaScript\" src=\"../Scripts/Script.js\"></script><BODY BGCOLOR='beige'><CENTER>"
 		 output+="<FONT FACE='Comic Sans MS' SIZE='+2' COLOR='Maroon'><B>"+cMessage+"</B></FONT><BR>"
		 if (nBorder==1) {
		 	output+="<TABLE BORDER='8'><TR><TD>"
		 }
		 output+="<IMG SRC='"+cPicture+"'>"
		 if (nBorder==1){
		 	output+="</TD></TR></TABLE>"
		 }

		 output+="<FORM><TABLE BORDER='5'><TR><TD><INPUT TYPE='button' VALUE='Cerrar' onClick='self.close()'>"
		 output+="</TD></TR></TABLE></FORM></CENTER></BODY></HTML>"
		 newWind.document.write(output);
		 newWind.document.close();
		 newWind.focus();
		 
}

function openWindowImage2( cPicture,nWidth,nHeight,cMessage,nBorder ){
		 var output;
		if (lOpened){
		   //newWind.close();
		}
		if ( cMessage == '' )
			cMessage = 'www.andream.com.ar' ;
		if ( nWidth == 0 )
			nWidth = 700;
		if ( nHeight == 0 )
			nHeight = 500;
		lOpened=true;
		 newWind=window.open("","winnam","HEIGHT="+nHeight+",WIDTH="+nWidth+",scrollbars=yes,resizable=no,top=5,left=5");
		 output="<HTML>"
		 output+="<meta http-equiv=\"imagetoolbar\" content=\"no\">"
		 output+="<script LANGUAGE=\"JavaScript\" src=\"../Scripts/Script.js\"></script><BODY BGCOLOR='beige'><CENTER>"
 		 output+="<FONT FACE='Comic Sans MS' SIZE='+2' COLOR='Maroon'><B>"+cMessage+"</B></FONT><BR>"
		 if (nBorder==1) {
		 	output+="<TABLE BORDER='8'><TR><TD>"
		 }
		 output+="<IMG SRC='"+cPicture+"'>"
		 if (nBorder==1){
		 	output+="</TD></TR></TABLE>"
		 }

		 output+="<FORM><TABLE BORDER='5'><TR><TD><INPUT TYPE='button' VALUE='Close' onClick='self.close()'>"
		 output+="</TD></TR></TABLE></FORM></CENTER></BODY></HTML>"
		 newWind.document.write(output);
		 newWind.document.close();
		 newWind.focus();
		 
}

// POPUP
function Popup(url,name,width,height,resize,scroll) {
var dialogWin = new Object();
dialogWin.width = width;
dialogWin.height = height;
now = new Date();
var millis=now.getTime();
var mstr=""+millis;
if (navigator.appName == "Netscape") {
dialogWin.left = window.screenX + ((window.outerWidth - dialogWin.width) / 2);
dialogWin.top = window.screenY + ((window.outerHeight - dialogWin.height) / 2);
var attr = 'screenX=' + dialogWin.left + ',screenY=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
} else if (document.all) {
dialogWin.left = (screen.width - dialogWin.width) / 2;
dialogWin.top = (screen.height - dialogWin.height) / 2;
var attr = 'left=' + dialogWin.left + ',top=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
}
window.open(url,name,attr);
}
