﻿
        function NewWindow(url) 
        {
	        var Width=700;
	        var Height=700;
	        var MyLeft= screen.width / 2 - Width / 2;
	        var MyTop= screen.height / 2 - Height / 2;
	        window.open(url);
        }
        
        function PopUp(id) 
        {
	        var Width=700;
	        var Height=700;
	        var MyLeft= screen.width / 2 - Width / 2;
	        var MyTop= screen.height / 2 - Height / 2;
	        window.open('~/PopView.aspx?PageID='+id, 'NewWindow', 'scrollbars=1,resizable=1,width='+Width+',height='+Height+',left=' + MyLeft + ',top=' + MyTop);
        }
        
        function popupimage(ImageID)
        {
                var width = 150;
                var height = 50;
                var left = parseInt((screen.availWidth/2) - (width/2));
                var top = parseInt((screen.availHeight/2) - (height/2));
                var windowFeatures = 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + 'screenX=' + left + ',screenY=' + top + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no';
                window.open('~/PopImage.aspx?fileid=' +ImageID,'_blank',windowFeatures);
        }

        function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
		if (document.all || document.layers) {
	   popw = screen.availWidth;
	   poph = screen.availHeight;
	    }
	    var posLeft = (popw-imageWidth)/2, posTop = (poph-imageHeight)/2;
	    newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,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()">'); 
	    if (imageType == "swf"){
	    newWindow.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	    newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param name=quality value=high>');
	    newWindow.document.write('<embed src=\"'+imageName+'\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	    newWindow.document.write('</embed></object>');	}else{
	    newWindow.document.write('<a onClick="window.close()"><img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">'); 	}
	    newWindow.document.write('</a></body></html>');
	    newWindow.document.close();
	    newWindow.focus();
	    }