
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sitename - Common Scripts File

Copyright (c) 2004 Sitename. All rights reserved.

Created: 11/Jan/2005 9:13
Updated: 11/Jan/2005 9:13

Revision History:
  1.00	Initial version. NK, 11/Jan/2005 9:13

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */


/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Browser detection */

var agent = navigator.userAgent.toLowerCase();
is_major = parseInt(navigator.appVersion);
is_minor = parseFloat(navigator.appVersion);

var is_win = (agent.indexOf("windows") != -1);
var is_mac = (agent.indexOf("mac") != -1);

is_nav  = ((agent.indexOf('mozilla') != -1) && (agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1) && (agent.indexOf('opera') == -1) && (agent.indexOf('webtv') == -1));
	is_nav6up = (is_nav && (is_major >= 5));

var is_ie = (agent.indexOf("msie") != -1);

var is_safari = ((agent.indexOf("mac os x") != -1) && (agent.indexOf("safari") != -1));
	if (is_safari) {
		is_nav = false;
	};
is_mozilla = ((agent.indexOf('mozilla') != -1) && (agent.indexOf('netscape') == -1) && (!is_ie));
	if (is_safari) {
		is_mozilla = false;
	};
is_opera = (agent.indexOf('opera') != -1);
	if (is_opera) {
		is_ie = false;
	};


/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Style sheet code */

var internalStyleSheetHTML = '';

// Browser and platform specific styles
if ((is_ie) && (is_win)) {
	internalStyleSheetHTML += '#content { margin-right: 8px; line-height: 10pt; }';
	internalStyleSheetHTML += '#feature { margin-right: 8px; }';
};

if ((is_nav6up) || (is_mozilla) || (is_safari)) {
	internalStyleSheetHTML += '';
};

if (is_opera) {
	internalStyleSheetHTML += '  ';
};

// Write internal style sheet
if (internalStyleSheetHTML != '') {
	internalStyleSheetHTML = '<style type="text\/css"><!-' + '- ' + internalStyleSheetHTML + ' -' + '-><\/style>';
	document.write(internalStyleSheetHTML);
};

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Miscellaneous functions */

function doNothing() {
	// Actually do nothing...
};

function cW() { 		// closeWindow
	self.close();
};