/*---------------------------------------------------+                                            
|              Sports-System Infusion                |
+----------------------------------------------------+
| Author: Fabio Niephaus                             |
| eMail: kontakt@idea2web.de                         |
| Web: http://www.idea2web.de/                       |
+----------------------------------------------------+
| written for                                        |
|   PHP-Fusion Content Management System             |
|   Copyright (C) 2002 - 2008 Nick Jones             |
|   http://www.php-fusion.co.uk/                     |
+----------------------------------------------------+
| Copyright © 2006-2009 Fabio Niephaus (idea2web)    |
| all rights reserved                                |
| licensed under this Creative Commons License:      |
| http://creativecommons.org/licenses/by-nc/3.0/     |
+---------------------------------------------------*/

//popup function
function popup(url, type) {
	if (type == '1') {
		var width = 750;
		var height = 700;
		var name = 'Details';
	} else if (type == '2') {
		var width = 400;
		var height = 250;
		var name = 'Location';
	} else if (type == '3') {
		var width = 800;
		var height = 600;
		var name = 'Print';
	} else if (type == '4') {
		var width = 750;
		var height = 630;
		var name = 'Preview';
	}
	var positionX = ((screen.availWidth / 2) - width / 2);
	var positionY = ((screen.availHeight / 2) - height / 2);
	pop = window
			.open(
					'',
					name,
					'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,fullscreen=0,width='
							+ width + ',height=' + height + ',top=0,left=0');
	pop.resizeTo(width, height);
	pop.moveTo(positionX, positionY);
	pop.location = url;
}

//---

// Checkbox
var Marker = 'false';
var i = '0';
function AllActivate(field) {
	if (Marker == 'false') {
		for (i = 0; i < field.length; i++) {
			field[i].checked = true;
		}
		Marker = 'true';
	} else {
		for (i = 0; i < field.length; i++) {
			field[i].checked = false;
		}
		Marker = 'false';
	}
}
//---

// eMail
function email(name, domain, tld, link) {
	if (link.length == 0) {
		link = name + '@' + domain + '.' + tld;
	}
	var display_this = '<a href="mailto:' + name + '@' + domain + '.' + tld
			+ '"><img src="images/system/email.png" alt="' + link
			+ '" border="0"></a>';
	document.write(display_this);
}
//---
