
//submit without image
function flvService ()
{
    document.fileview_login.submit() ;
}


//From fileview login (checks whether other field is empty)
function isEmpty()
{
	if ( (document.fileview_login.caseno.value == "" && document.fileview_login.user.value == "" ) || document.fileview_login.password.value == "" )  //Is this form field blank?
	{
		alert('To login to Fileview,  please ensure you have entered your Username or Case Number and Password.'); //They are both blank so alert.
		return false; // end the if statement
	}	
		else //It is not blank so process
	
		{
			if(navigator.appName.indexOf("Netscape")>(-1))
			{
				 // The other one is not blank so put it's value into this form
				flvwin = window.open( '', '_fileview', 'resizable,status,scrollbars,width=790,height=760,x=0,y=0,top=0,left=0' ); // open up a window
				document.fileview_login.submit(); //submit the value
				setTimeout("clearMe()", 10000); // clear the values from the parent window after 10 seconds
				flvwin.focus(); //make the pop up the focus
				return false; //everything is ok
			}
			else
			{
				 // The other one is not blank so put it's value into this form
				flvwin = window.open( '', '_fileview', 'resizable, status=yes, scrollbars=yes, width=760, height=740,top=0,left=0' ); // open up a window
				document.fileview_login.submit(); //submit the value
				setTimeout("clearMe()", 10000); // clear the values from the parent window
				flvwin.focus(); //make the pop up the focus
				return false; //everything is ok
			}
		}
	
	
}

var flvwin = null;

// IF appVersion is MAC AND IF userAgent is MSIE5 then do nothing.
// IF they are anything else set the fields to ""

function clearMe()
{
	var agt=navigator.userAgent.toLowerCase();
		
	document.fileview_login.caseno.value = "";
	document.fileview_login.password.value = "";
	document.fileview_login.user.value = "";
	
}


//register popup window controls
function windowOpen()
{
	if(navigator.appName.indexOf("Netscape")>(-1))
	{
	flvwin = window.open('','_fileview','resizable,status,width=790,height=520,top=0,left=0');
	window.focus;
	}
	else
	{
	flvwin = window.open('','_fileview','resizable,status,width=740,height=520,top=0,left=0');
	window.focus;
	}
}

//focus cursor in fileview main box


