 var newWindow;



 function OpenFormWindow(page, width, height) {

   	newWindow = window.open('', 'write', 'width='+width+',height='+height+',topmargin=0,leftmargin=0,resizable=yes');

  	if (newWindow != null) {

    		if (newWindow.opener == null) {

      			newWindow.opener = self;

    		}    

    		newWindow.location.href = page;

		newWindow.focus();

  	}

 }



 function OpenWindow(page,pic) {

    

    if (!newWindow || newWindow.closed) {

       newWindow = window.open(page+"?pic="+pic, 'write', 'topmargin=0,leftmargin=0,resizable=yes,scrollbars=no');		

    } else {

       newWindow.close();

       newWindow = window.open(page+"?pic="+pic, 'write', 'topmargin=0,leftmargin=0,resizable=yes,scrollbars=no');

    }

    newWindow.focus();     	        

 } 





 function ShowProgress(barref) {

  strAppVersion = navigator.appVersion;

  if (document.UploadForm.FILE1.value != "")

  {

    if (strAppVersion.indexOf('MSIE') != -1 && strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4)

    {

		if( strAppVersion.indexOf("Macintosh") != -1 && strAppVersion.charAt(0) >= 3 )

		{

			window.open(barref+'&b=NN','','width=370,height=115', true);

		}

		else

		{

			winstyle = "dialogWidth=385px; dialogHeight:140px; center:yes";

			window.showModelessDialog(barref+'&b=IE',null,winstyle);

		}

    }

    else

    {

      window.open(barref+'&b=NN','','width=370,height=115', true);

    }

  }

  return true;

 }


