Index: /lib/functions.inc.php
===================================================================
--- /lib/functions.inc.php	(revision 6506)
+++ /lib/functions.inc.php	(revision 6507)
@@ -130,4 +130,58 @@
 	} // function wpsg_define($name, $value)
 	
+	function wpsg_parse_size($size) 
+	{
+  
+		$unit = preg_replace('/[^bkmgtpezy]/i', '', $size); // Remove the non-unit characters from the size.
+  		$size = preg_replace('/[^0-9\.]/', '', $size); // Remove the non-numeric characters from the size.
+  
+		if ($unit) 
+		{
+    
+			return round($size * pow(1024, stripos('bkmgtpezy', $unit[0])));
+  		
+		}
+  		else 
+		{
+    
+			return round($size);
+  
+		}
+
+	} // function wpsg_parse_size($size) 
+
+	function wpsg_get_file_upload_max_size() 
+	{
+  
+		static $max_size = -1;
+
+  		if ($max_size < 0) 
+		{
+    
+    		$post_max_size = wpsg_parse_size(ini_get('post_max_size'));
+    
+			if ($post_max_size > 0) 
+			{
+      
+				$max_size = $post_max_size;
+    
+			}
+
+    		$upload_max = wpsg_parse_size(ini_get('upload_max_filesize'));
+    
+			if ($upload_max > 0 && $upload_max < $max_size) 
+			{
+      
+				$max_size = $upload_max;
+    
+			}
+  
+		}
+  
+		return $max_size;
+		
+	} // function wpsg_get_file_upload_max_size()
+
+
 	/**
 	 * Setzt einen Wert oder addiert ihn
Index: /lib/ui/jquery.ui.datepicker-de.js
===================================================================
--- /lib/ui/jquery.ui.datepicker-de.js	(revision 6506)
+++ /lib/ui/jquery.ui.datepicker-de.js	(revision 6507)
@@ -2,4 +2,8 @@
 /* Written by Milian Wolff (mail@milianw.de). */
 jQuery(function($){
+	
+	if (typeof $.datepicker != "undefined")
+	{
+	
 	$.datepicker.regional['de'] = {
 		closeText: 'schlie&szlig;en',
@@ -21,3 +25,6 @@
 		yearSuffix: ''};
 	$.datepicker.setDefaults($.datepicker.regional['de']);
+		
+	}
+	
 });
Index: /views/produkt/import.phtml
===================================================================
--- /views/produkt/import.phtml	(revision 6506)
+++ /views/produkt/import.phtml	(revision 6507)
@@ -33,5 +33,5 @@
 					<br />
 				
-					<input type="file" name="wpsg_importfile" />
+					<input type="file" id="wpsg_importfile" name="wpsg_importfile" />
 					
 					<br /><br />
@@ -40,4 +40,30 @@
 				</form>
 				
+				<script type="text/javascript">/* <![CDATA[ */
+				  
+					jQuery('#import_form').on('submit', function(evt) {
+						 
+						var file = jQuery('#wpsg_importfile')[0].files[0];
+						
+						if (file && file.size < <?php echo wpsg_get_file_upload_max_size(); ?>)
+						{
+							
+							return true;
+							
+						}
+						else
+						{
+							
+							alert("<?php echo wpsg_translate(__('DateigrÃ¶Ãe ÃŒbersteigt Upload Limit von #1#.', 'wpsg'), wpsg_formatSize(wpsg_get_file_upload_max_size())); ?>");
+							
+							evt.preventDefault();
+							return false;
+							
+						} 
+												
+					} );
+										
+				/* ]]> */</script>
+				
 			</div>
 		</div>
