<!-- // U-Upload Pro script file.  Include this file as a script in your own personal page.
// <script language="javascript" src="uuploadpro.js"></script> is the only code you will need
// to add to your page.  Just make sure that uuploadpro.js is in the same directory as you page.

// Also note that if you wan to populate the variables dynamically with JSP, ASP, PHP, or Cold Fusion
// it may be easier if you cut/paste the contents of this file into your page between <script>...</script> tags. -->

// Use these Javascript variables to control the applet parameters

var numkeys 			= 1; // The number of keys you have
var keys= new Array(numkeys);

// Enter you keys here in the following form, starting with key[0], key[1], key[2], etc...
 
keys[0]				= ""; 

// Un-comment the folowing lines to add additional keys

//keys[1]				= ""; 
//keys[2]				= "";

// Use these Javascript variables to control the applet parameters


// Connection related values

var server 			= "u-uju*<M+~k$5wJH";
var port 			= "21";
var user 			= "u-uju*<M";
var pass 			= "#(uu)Fr";
var passive 			= "true";
var encrypt			= "true";
var ek				= "rugger99"; 
var connecttimeout		= "";
var sotimeout			= "";
var maxRetries			= "";
var waitRetry			= "";
var useSerfo			= "";
var SerfoLocation		= "";
var servletUploadMultiplier	= "";
var enableHTTPResume		= "";

// Proxy related settings for IE only

var autodetectproxy		= "";
var socksproxy			= "";
var socksProxyHost		= "";
var socksProxyPort		= "";
var ftpproxy			= "";
var ftpProxyHost		= "";
var ftpProxyPort		= "";

// Functionallity related values

currentTime = new Date(); 
var timestr = currentTime.getMonth()+"."+currentTime.getDate()+"."+currentTime.getHours()+"_"+currentTime.getMinutes(); 
var createdirectoryonstartup = "/public_html/uploaded_files/"+timestr; 
var remotedir    = "/public_html/uploaded_files/"+timestr; 
var localdir 			= "";
var exclude			= "";
var invertexclude		= "";
var filefilter1 		= "";
var filefilter2 		= "";
var filefilter3 		= "";
var showdialogs 		= "true";
var maintainpathinfo		= "";
var autozip 			= "";
var rezip 			= "";
var zippathinfo			= "";
var zipfilename 		= "";
var confirmoverwrite 		= "";
var callurlaftertransfer	= "http://www.atlantarugby.com";
var callurlaftertransfertarget	= "";
var transfererrorurl		= "";
var transfererrorurltarget	= "";
var transfercancelurl		= "http://www.atlantarugby.com/photogallery/upload";
var transfercancelurltarget	= "";
var othererrorurl		= "";
var othererrorurltarget		= "";
var redirectfilenotexisturl	= "";
var redirectfilenotexisturltarget = "";
var site 			= "";
var mode 			= "";
var autoupload 			= "";
var fileset			= "";
var filesetrename		= "";
var maxfiles			= "";
var enableResume 		= "";
var appendFilesToURL 		= "";
var filesTransferredParameter 	= "";
var showsizeanddate 		= "";
var showservername		= "";
var delimiter			= "";
var removeaccentsandquotes	= "";
var removespaces		= "";
var browsenative 		= "";
var useTempName			= "";
var totalProgress		= "";
var siteCommandStor		= "";
var sendLogsToURL		= "";
var postURL			= "";
var removePathsFromPostData	= "";
var checksize 			= "";

// values that effect the color and interface layout of the client

var width			= "500";
var height			= "150";
var bgcolor 			= "";		
var textwidth 			= "";
var language 			= "";

// some customizable error pages

var rejectPermissionURL = "rejectPerms.html";
var errNavWin 		= "errNavWin.html";
var errIEWin 		= "errIEWin.html";
var errIEWinVM		= "errIEWinVM.html";
var errNavUnix		= "errNavUnix.html";
var errIEMac		= "errIEMac.html";
var errNavMac		= "errNavMac.html";
var errOperaWin		= "errOperaWin.html";

//*************************************************************************************** //
// ********** DO NOT EDIT BELOW THIS POINT UNLESS YOU KNOW WHAT YOU ARE DOING!  ********* //
//*************************************************************************************** //

        var agt=navigator.userAgent.toLowerCase();

        // detect browser version
        // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
        var is_major = parseInt(navigator.appVersion);
        var is_minor = parseFloat(navigator.appVersion);

        // *** BROWSER TYPE ***
        var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                    && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                    && (agt.indexOf('webtv')==-1));

	var is_safari = (agt.indexOf('safari')!=-1);
	var is_firefox = (agt.indexOf('firefox')!=-1);
	var is_opera = (agt.indexOf('opera')!=-1);
	var is_opera6up = (is_opera && (is_major >= 6));
        var is_nav4up = (is_nav && (is_major >= 4));
	var is_nav6up = (is_nav && (is_major >= 5));
	var is_konqueror = (agt.indexOf('konqueror')!=-1);
        var is_ie   = (agt.indexOf("msie") != -1);


	// *** PLATFORM ***
        var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
	var is_mac   = (agt.indexOf("mac")!=-1);


	function isMacClassic() {
		return (is_mac && !isMacX());
	}

	function isMacX() {
		if (isMacJaguar()) return true;	
		if (agt.indexOf("omniweb") != -1) return true;			
 		for (var i = 0; i < navigator.plugins.length; i++) {
  			if (navigator.plugins[i].name.indexOf("OJI") > -1) return true;	
			if (navigator.plugins[i].name.indexOf("Default Plugin Carbon.cfm") > -1) return true;			
 		}  	
		return false;		
	}

	function isMacJaguar() {
		return (is_mac && javaPlugin()); // we know java plugin means 10.2 or higher
	}


	function microsoftVM() {
		if (!(is_ie && is_win)) return false;
		document.body.addBehavior("#default#clientCaps");
		return (document.body.isComponentInstalled("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}", "componentid")) ;
	}
	

	function javaPlugin() {	
		
		if (is_safari || is_opera6up || is_konqueror || is_firefox) return true;   // we know safari and opera use java plugin

 		for (var i = 0; i < navigator.plugins.length; i++) {

  			if (navigator.plugins[i].name.indexOf("Java Plug-in") > -1) return true;

 		} 
		return false;		
	}


	function mrj()  {
		if (isMacX()) return true;	
 		for (var i = 0; i < navigator.plugins.length; i++) {
  			if (navigator.plugins[i].name.indexOf("MRJ") > -1) return true;			
 		} 
		return false;
	}


	function useObjectTag() {				
		return is_win && is_ie && (javaPlugin() || !microsoftVM());
	}

	function useEmbedTag() { // only use embed tag for netscape 4 
		return (is_nav && is_minor < 5 && !isMacJaguar()) && (javaPlugin() || mrj());
	}


	// The following script will detect weather MAC or PC version of the applet should be started 
	// and set up the apropriate jar file

	var jar = "uuploadpro.jar";
	var classname = "unlimited.ftp.UUpload";
	if (is_mac && !isMacJaguar()) {
		var jar = "uuploadproMac.jar";
	}
	else if (javaPlugin()){  	
		var jar = "uuploadproplugin.jar";
		var classname = "unlimited.ftp.UUploadPlugin";

	}
	

	if (!useEmbedTag()) {
		if (useObjectTag()) {	  					
			document.write("<OBJECT id=uupload name='uupload' classid='clsid:8AD9C840-044E-11D1-B3E9-00805F499D93' codebase='http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab' height="+height+" width="+width+"'>");			
		} else {
  			document.write("<APPLET name=uupload code="+classname+".class height="+height+" width="+width+" archive='"+jar+"' MAYSCRIPT>");			
		}
		document.write("<param name='archive' value='"+jar+"'>");
		document.write("<PARAM NAME='scriptable' VALUE='true'>");
		document.write("<PARAM NAME='MAYSCRIPT' VALUE='true'>");
		document.write("<PARAM NAME = 'id' VALUE='uupload'>");	
		document.write("<param name='code' value='"+classname+".class'>");
  		document.write("<PARAM NAME='cabbase' VALUE='uuploadpro.cab'>");
		document.write("<PARAM NAME='debug' VALUE='true'>");
  		document.write("<PARAM NAME='bgcolor' VALUE='"+bgcolor+"'>");
  		document.write("<PARAM NAME='server' VALUE='"+server+"'>");		
  		document.write("<PARAM NAME='port' VALUE='"+port+"'>");
  		document.write("<PARAM NAME='pass' VALUE='"+pass+"'>");
  		document.write("<PARAM NAME='user' VALUE='"+user+"'>");
		document.write("<PARAM NAME='maxRetries' VALUE='"+maxRetries+"'>");
		document.write("<PARAM NAME='waitRetry' VALUE='"+waitRetry+"'>");
		document.write("<PARAM NAME='passive' VALUE='"+passive+"'>");
  		document.write("<PARAM NAME='remotedir' VALUE='"+remotedir+"'>");
  		document.write("<PARAM NAME='localdir' VALUE='"+localdir+"'>");
  		document.write("<PARAM NAME='textwidth' VALUE='"+textwidth+"'>");
  		document.write("<PARAM NAME='showdialogs' VALUE='"+showdialogs+"'>");
  		document.write("<PARAM NAME='site' VALUE='"+site+"'>");
		document.write("<PARAM NAME='mode' VALUE='"+mode+"'>");
		document.write("<PARAM NAME='exclude' VALUE='"+exclude+"'>");
		document.write("<PARAM NAME='invertexclude' VALUE='"+invertexclude+"'>");
  		document.write("<PARAM NAME='language' VALUE='"+language+"'>");
  		document.write("<PARAM NAME='autozip' VALUE='"+autozip+"'>");
  		document.write("<PARAM NAME='zipfilename' VALUE='"+zipfilename+"'>");
		document.write("<PARAM NAME='zippathinfo' VALUE='"+zippathinfo+"'>");
		document.write("<PARAM NAME='maintainpathinfo' VALUE='"+maintainpathinfo+"'>");
  		document.write("<PARAM NAME='confirmoverwrite' VALUE='"+confirmoverwrite+"'>");
		document.write("<PARAM NAME='autoupload' VALUE='"+autoupload+"'>");
		document.write("<PARAM NAME='fileset' VALUE='"+fileset+"'>");
		document.write("<PARAM NAME='filesetrename' VALUE='"+filesetrename+"'>");
		document.write("<PARAM NAME='maxfiles' VALUE='"+maxfiles+"'>");
  		document.write("<PARAM NAME='appendFilesToURL' VALUE='"+appendFilesToURL+"'>");
  		document.write("<PARAM NAME='enableResume' VALUE='"+enableResume+"'>");
		document.write("<PARAM NAME='showsizeanddate' VALUE='"+showsizeanddate+"'>");
		document.write("<PARAM NAME='removeaccentsandquotes' VALUE='"+removeaccentsandquotes+"'>");
  		document.write("<PARAM NAME='filesTransferredParameter' VALUE='"+filesTransferredParameter+"'>");
  		document.write("<PARAM NAME='createdirectoryonstartup' VALUE='"+createdirectoryonstartup+"'>");
  		document.write("<PARAM NAME='callurlaftertransfer' VALUE='"+callurlaftertransfer+"'>");
		document.write("<PARAM NAME='callurlaftertransfertarget' VALUE='"+callurlaftertransfertarget+"'>");
		document.write("<PARAM NAME='transfererrorurl' VALUE='"+transfererrorurl+"'>");
		document.write("<PARAM NAME='transfercancelurl' VALUE='"+transfercancelurl+"'>");
		document.write("<PARAM NAME='transfererrorurltarget' VALUE='"+transfererrorurltarget+"'>");
		document.write("<PARAM NAME='transfercancelurltarget' VALUE='"+transfercancelurltarget+"'>");
		document.write("<PARAM NAME='othererrorurl' VALUE='"+othererrorurl+"'>");
		document.write("<PARAM NAME='othererrorurltarget' VALUE='"+othererrorurltarget+"'>");
		document.write("<PARAM NAME='redirectfilenotexisturl' VALUE='"+redirectfilenotexisturl+"'>");
		document.write("<PARAM NAME='redirectfilenotexisturltarget' VALUE='"+redirectfilenotexisturltarget+"'>");
		document.write("<PARAM NAME='rejectPermissionURL' VALUE='"+rejectPermissionURL+"'>");
  		document.write("<PARAM NAME='filefilter1' VALUE='"+filefilter1+"'>");
  		document.write("<PARAM NAME='filefilter2' VALUE='"+filefilter2+"'>");
  		document.write("<PARAM NAME='filefilter3' VALUE='"+filefilter3+"'>");  
		document.write("<PARAM NAME='errIEWinVM' VALUE='"+errIEWinVM+"'>");
		document.write("<PARAM NAME='encrypt' VALUE='"+encrypt+"'>");
		document.write("<PARAM NAME='autodetectproxy' VALUE='"+autodetectproxy+"'>");
		document.write("<PARAM NAME='socksproxy' VALUE='"+socksproxy+"'>");
		document.write("<PARAM NAME='socksProxyHost' VALUE='"+socksProxyHost+"'>");
		document.write("<PARAM NAME='socksProxyPort' VALUE='"+socksProxyPort+"'>");
		document.write("<PARAM NAME='ftpproxy' VALUE='"+ftpproxy+"'>");
		document.write("<PARAM NAME='ftpProxyHost' VALUE='"+ftpProxyHost+"'>");
		document.write("<PARAM NAME='ftpProxyPort' VALUE='"+ftpProxyPort+"'>");	
		document.write("<PARAM NAME='sotimeout' VALUE='"+sotimeout+"'>");		
		document.write("<PARAM NAME='connecttimeout' VALUE='"+connecttimeout+"'>");
		document.write("<PARAM NAME='SerfoLocation' VALUE='"+SerfoLocation+"'>");	
		document.write("<PARAM NAME='useSerfo' VALUE='"+useSerfo+"'>");
		document.write("<PARAM NAME='showservername' VALUE='"+showservername+"'>");
		document.write("<PARAM NAME='delimiter' VALUE='"+delimiter+"'>");
		document.write("<PARAM NAME='browsenative' VALUE='"+browsenative+"'>");
		document.write("<PARAM NAME='useTempName' VALUE='"+useTempName+"'>");
		document.write("<PARAM NAME='enableHTTPResume' VALUE='"+enableHTTPResume+"'>");
		document.write("<PARAM NAME='totalProgress' VALUE='"+totalProgress+"'>");
		document.write("<PARAM NAME='siteCommandStor' VALUE='"+siteCommandStor+"'>");
		document.write("<PARAM NAME='removespaces' VALUE='"+removespaces+"'>");
		document.write("<PARAM NAME='sendLogsToURL' VALUE='"+sendLogsToURL+"'>");
		document.write("<PARAM NAME='postURL' VALUE='"+postURL+"'>");
		document.write("<PARAM NAME='servletUploadMultiplier' VALUE='"+servletUploadMultiplier+"'>");
		document.write("<PARAM NAME='removePathsFromPostData' VALUE='"+removePathsFromPostData+"'>");
		document.write("<PARAM NAME='rezip' VALUE='"+rezip+"'>");
		document.write("<PARAM NAME='checksize' VALUE='"+checksize+"'>");

		document.write("<PARAM NAME='ek' VALUE='"+ek+"'>");
		for (n=0; n < numkeys; n++)
			document.write("<PARAM NAME='key"+(n+1)+"' VALUE='"+keys[n]+"'>");			
		if (useObjectTag())
			document.write("</OBJECT>");
		else
  			document.write("</APPLET>");		     
	}
	else if (useEmbedTag()){ 
	        document.writeln("<EMBED  TYPE = 'application/x-java-applet' name='uupload' pluginspage='http://java.sun.com/webapps/getjava/BrowserRedirect' BORDER='0' scriptable='true'");
		document.writeln("code='"+classname+".class' height="+height+" width="+width+"  archive='"+jar+"' "); 		
		document.writeln("bgcolor='"+bgcolor+"'"); 
		document.writeln("server='"+server+"'");
		document.writeln("port='"+port+"'"); 
		document.writeln("pass='"+pass+"'"); 
		document.writeln("maxRetries='"+maxRetries+"'"); 
		document.writeln("waitRetry='"+waitRetry+"'"); 
		document.writeln("passive='"+passive+"'");
		document.writeln("showdialogs='"+showdialogs+"'");
		document.writeln("user='"+user+"'"); 
		document.writeln("remotedir='"+remotedir+"'");
		document.writeln("localdir='"+localdir+"'");
		document.writeln("textwidth='"+textwidth+"'"); 
		document.writeln("showdialogs='"+showdialogs+"'"); 
		document.writeln("site='"+site+"'"); 
		document.writeln("mode='"+mode+"'"); 
		document.writeln("exclude='"+exclude+"'");
		document.writeln("autoupload='"+autoupload+"'");
		document.writeln("fileset='"+fileset+"'");
		document.writeln("filesetrename='"+filesetrename+"'");
		document.writeln("maxfiles='"+maxfiles+"'");
		document.writeln("appendFilesToURL='"+appendFilesToURL+"'");
		document.writeln("enableResume='"+enableResume+"'");
		document.writeln("showsizeanddate='"+showsizeanddate+"'");
		document.writeln("filesTransferredParameter='"+filesTransferredParameter+"'");  		
		document.writeln("language='"+language+"'"); 
		document.writeln("autozip='"+autozip+"'"); zipfilename
		document.writeln("zipfilename='"+zipfilename+"'");
		document.writeln("zippathinfo='"+zippathinfo+"'");
		document.writeln("maintainpathinfo='"+maintainpathinfo+"'");
		document.writeln("removeaccentsandquotes='"+removeaccentsandquotes+"'");
		document.writeln("confirmoverwrite='"+confirmoverwrite+"'"); 
		document.writeln("createdirectoryonstartup='"+createdirectoryonstartup+"'"); 
		document.writeln("filefilter1='"+filefilter1+"'");
		document.writeln("filefilter2='"+filefilter2+"'");
		document.writeln("filefilter3='"+filefilter3+"'");
		document.writeln("callurlaftertransfer='"+callurlaftertransfer+"'");
		document.writeln("callurlaftertransfertarget='"+callurlaftertransfertarget+"'");
		document.writeln("transfererrorurl='"+transfererrorurl+"'");
		document.writeln("transfercancelurl='"+transfercancelurl+"'");
		document.writeln("transfererrorurltarget='"+transfererrorurltarget+"'");
		document.writeln("transfercancelurltarget='"+transfercancelurltarget+"'");
		document.writeln("othererrorurl='"+othererrorurl+"'");
		document.writeln("othererrorurltarget='"+othererrorurltarget+"'");
		document.writeln("redirectfilenotexisturl='"+redirectfilenotexisturl+"'");
		document.writeln("redirectfilenotexisturltarget='"+redirectfilenotexisturltarget+"'");
		document.writeln("rejectPermissionURL='"+rejectPermissionURL+"'");
		document.writeln("errIEWinVM='"+errIEWinVM+"'");
		document.writeln("encrypt='"+encrypt+"'");
		document.writeln("autodetectproxy='"+autodetectproxy+"'");
		document.writeln("socksproxy='"+socksproxy+"'");
		document.writeln("socksProxyHost='"+socksProxyHost+"'");
		document.writeln("socksProxyPort='"+socksProxyPort+"'");
		document.writeln("ftpproxy='"+ftpproxy+"'");
		document.writeln("ftpProxyHost='"+ftpProxyHost+"'");
		document.writeln("ftpProxyPort='"+ftpProxyPort+"'");	
		document.writeln("sotimeout='"+sotimeout+"'");	
		document.writeln("connecttimeout='"+connecttimeout+"'");
		document.writeln("SerfoLocation='"+SerfoLocation+"'");
		document.writeln("useSerfo='"+useSerfo+"'");
		document.writeln("showservername='"+showservername+"'");
		document.writeln("delimiter='"+delimiter+"'");
		document.writeln("browsenative='"+browsenative+"'");
		document.writeln("useTempName='"+useTempName+"'");enableHTTPResume
		document.writeln("enableHTTPResume='"+enableHTTPResume+"'");
		document.writeln("totalProgress='"+totalProgress+"'");
		document.writeln("siteCommandStor='"+siteCommandStor+"'");
		document.writeln("removespaces='"+removespaces+"'");
		document.writeln("sendLogsToURL='"+sendLogsToURL+"'");
		document.writeln("postURL='"+postURL+"'");
		document.writeln("servletUploadMultiplier='"+servletUploadMultiplier+"'");
		document.writeln("removePathsFromPostData='"+removePathsFromPostData+"'");
		document.writeln("rezip='"+rezip+"'"); 
		document.writeln("checksize='"+checksize+"'");

		document.writeln("ek='"+ek+"'");
		for (n=0; n < numkeys; n++)
			document.write("key"+(n+1)+"='"+keys[n]+"'");	
		document.writeln(">"); 
	}

	else if (isMacClassic()) {//Netscape doesn't have the MRJ Plugin.
		window.location.href=errNavMac;
	}

