var is = new browserCheck();
var imgExt = ".gif";
var myLayers = new Array ("background", "logo", "navigation1", "navigation2","navigation3","body","print", "playful", "playfulbottom","newinfo");
var defaultOffsets = new Array (0, 0, 0, 0, 0, 0, 0, 12, 12, 0);
var printPageShowing = false, defaultLanguage = "en", defaultPath = "";
function browserCheck() {
	var b = navigator.appName;
	this.agent = window.navigator.userAgent;
	this.win = (this.agent.indexOf('Win')>0);
	this.mac = (this.agent.indexOf('Mac')>0);
	switch (b) {
		case "Netscape": this.b = "ns"; break;
		case "Microsoft Internet Explorer": this.b = "ie"; break;
		default: this.b = b};
	this.version = navigator.appVersion;
	this.v = parseInt(this.version);
	this.ns = (this.b=="ns" && this.v>=4);
	this.ns4 = (this.b=="ns" && this.v==4);
	this.ns5 = (this.b=="ns" && this.v==5);
	this.ie = (this.b=="ie" && this.v>=4);
	this.ie4 = (this.version.indexOf('MSIE 4')>0);
	this.ie5 = (this.version.indexOf('MSIE 5')>0);
	this.min = (this.ns||this.ie);
	if (this.ns4) {
		var d = document; var w = window;
		if (typeof d.cs == 'undefined') {
			d.cs = new Object;
			d.cs.csFix = new Object};
		d.cs.csFix.w = w.innerWidth;
		d.cs.csFix.h = w.innerHeight;
		window.onresize = NSFixFct}};
function NSFixFct() {
	var d = document; var w = window;
	if (d.cs.csFix.w != w.innerWidth || d.cs.csFix.h != w.innerHeight) {
		d.location = d.location}};
function clickReturn () {
	if (is.ie && (is.agent.indexOf("Mozilla/3") >= 0) && (is.mac)) {
		return true}
	else {
		return false}};
function layerObj (id) {
	this.id = id;
	this.obj = findLayer (this.id);
	if (is.ns4) {
		this.x = this.obj.left;
		this.y = this.obj.top}
	else {
		this.x = this.obj.offsetLeft;
		this.y = this.obj.offsetTop};
	this.write = writeLayer;
	this.clip = clipLayer;
	this.getWidth = getWidth;
	this.getHeight = getHeight;
	this.setHeight = setHeight;
	this.getClip = getClipValue;
	this.moveTo = moveLayerTo;
	this.moveBy = moveLayerBy;
	this.scrollBy = scrollLayerBy;
	this.alignMiddle = alignMiddle;
	this.show = show;
	this.hide = hide};
function imageObj (id, preloads, urlprefix) {
	if (urlprefix == null) {
		this.url = "template/" + id.replace (/:/g, '/')}
	else {
		this.url =  urlprefix + "/" + id.replace (/:/g, '/')};
	if (is.ns4) {
		this.obj = findElement(id,0)}
	else {
		this.obj = document.images[id]};
	for (var ct=0;ct<preloads.length;ct++) {
		var suffix = "_" + preloads[ct];
		if (preloads[ct] == "_") {
			suffix = ""};
		this[preloads[ct]] = new Image ();
		if (preloads[ct] != "current") {
			this[preloads[ct]].src = imgprefix + "images/" + this.url + suffix + ".gif"}
		else {
			this[preloads[ct]].src = this.obj.src}};
	this.set = setImage};
function navObj (id) {
	this.id = id + "NavObj";
	eval (this.id+"=this");
	this.image = new imageObj (id.replace (/__/g, '_:'), new Array ("current", "m"), "navigation");
	this.over = new Function (this.id + '.image.set (' + this.id + '.image.m.src)');
	this.out = new Function (this.id + '.image.set (' + this.id + '.image.current.src)')};
function startScroll (direction) {
	if (this.interval != null) {
		clearInterval (this.interval);
		this.interval = null};
	if (direction == "stop") {
		this.checkScroll ('up');
		this.checkScroll ('down')}
	else {
		this.interval = setInterval (this.id + '.runScroll (\'' + direction + '\')', 2)}};
function runScroll (direction) {
	var doScroll = false, imgObject;
	var vStep, hStep = 0;
	if (direction == "up") {
		imgObject = this.scrollUp.image;
		vStep = -1;
		if (this.layer.getClip ('top') > 0) {
			doScroll = true}};
	if (direction == "down") {
		imgObject = this.scrollDown.image;
		vStep = 1;
		if (this.layer.getClip ('bottom') < this.layer.h) {
			doScroll = true}};
	if (doScroll) {
		imgObject.set (imgObject.m.src);
		this.layer.scrollBy (hStep, vStep);
		this.checkScroll (direction)}};
function checkScroll (direction) {
	var scrollIt = false, imgObject;
	if (direction == 'down') {
		imgObject = this.scrollUp.image;
		if (this.layer.getClip ('top') > 0) {
			scrollIt = true}};
	if (direction == 'up') {
		imgObject = this.scrollDown.image;
		if (this.layer.getClip ('bottom') < this.layer.h) {
			scrollIt = true}};
	if (scrollIt) {
		imgObject.set (imgObject.x.src)}
	else {
		imgObject.set (imgObject._.src)}};
function scrollReturn() {
	return false};
function textObj (id, w, h) {
	this.id = id + "TextObj";
	eval(this.id+"=this");
	this.layer = new layerObj (id);
	this.layer.w = this.layer.getWidth ();
	this.layer.h = this.layer.getHeight ();
	if (w == null) {
		w = this.layer.w};
	if (h == null) {
		h = this.layer.h};
	this.layer.show ()};
function findElement(name, layer) {
	if (is.version < 4) {
		return document[name]};
	if (is.v == 4) {
		var curDoc = layer ? layer.document : document, elem = curDoc[name];
		if (!elem) {
			for (var i=0;i<curDoc.layers.length;i++) {
				elem = findElement (name, curDoc.layers[i]);
				if (elem) {
					return elem}}}}
	else {
		elem = document.getElementById (name)};
	return elem};
function findLayer (name) {
	if (is.ie) {
		return document.all.tags("div")[name]}
	else {
		return findElement(name,0)}};
function setImage (url) {
	this.obj.src = url};
function getWidth () {
	if (is.ie) {
		return (is.ie4)? this.obj.style.pixelWidth :  this.obj.offsetWidth}
	else {
		if (is.ns4) {
			if ( this.obj.document.width) {
				return ( this.obj.document.width)}
			else {
				return ( this.obj.clip.right -  this.obj.clip.left)}}
		else {
			return this.obj.style.width}};
	return -1};
function getHeight () {
	if (is.ns4) {
		return this.obj.clip.height}
	else if (is.ie) {
		if (this.obj.style.pixelHeight) {
			return this.obj.style.pixelHeight}
		else {
			return this.obj.clientHeight}}
	else {
		return parseInt (this.obj.scrollHeight)};
	return -1};
function setHeight (value) {
	if (is.ns4) {
		this.obj.document.height = value}
	else {
		this.obj.style.height = value};
	return true};
function setTop (value) {
	if (is.ns4) {
		this.obj.document.top = value}
	else {
		this.obj.style.top = value};
	return true};
function writeLayer (html) {
	if (is.ns4) {
		this.obj.document.open ();
		this.obj.document.write (html);
		this.obj.document.close ()}
	else {
		this.obj.innerHTML = html}};
function moveLayerTo (x, y) {
	if (x!=null) {
		this.x = x;
		if (is.ie) {
			 this.obj.style.pixelLeft = this.x}
		else {
			if (is.ns4) {
				this.obj.left = this.x}
			else {
				this.obj.style.left = this.x}}};
	if (y!=null) {
		this.y = y;
		if (is.ie) {
			 this.obj.style.pixelTop = this.y}
		else {
			if (is.ns4) {
				this.obj.top = this.y}
			else {
				this.obj.style.top = this.y}}}};
function moveLayerBy (dx, dy) {
	this.moveTo(this.x+dx,this.y+dy)};
function clipLayer(clipleft, cliptop, clipright, clipbottom) {
	if (is.ns4) {
		this.obj.clip.left  = clipleft;
		this.obj.clip.top = cliptop;
		this.obj.clip.right = clipright;
		this.obj.clip.bottom = clipbottom}
	else {
		this.obj.style.clip = 'rect(' + cliptop + ' ' +  clipright + ' ' + clipbottom + ' ' + clipleft +')';}};
function getClipValue (which) {
	if (is.ns4) {
		return this.obj.clip[which]}
	else {
		if (this.obj.style.clip) {
			var clip = getIEClipValues(this.obj.style.clip);
			switch (which) {
				case "top": return clip[0];
				case "right": return clip[1];
				case "bottom": return clip[2];
				case "left": return clip[3]}}};
	return 0;
	return -1};
function getIEClipValues(str) {
	var clip = new Array();
	var i;
	i = str.indexOf("(");
	clip[0] = parseInt(str.substring(i + 1, str.length), 10);
	i = str.indexOf(" ", i + 1);
	clip[1] = parseInt(str.substring(i + 1, str.length), 10);
	i = str.indexOf(" ", i + 1);
	clip[2] = parseInt(str.substring(i + 1, str.length), 10);
	i = str.indexOf(" ", i + 1);
	clip[3] = parseInt(str.substring(i + 1, str.length), 10);
	return(clip)};
function scrollLayerBy(dx, dy, bound) {
	var cl = 0;
	var ct = this.getClip("top");
	var cr = this.getClip("right");
	var cb = this.getClip("bottom");
	if (bound) {
		if (cl + dx < 0) {
			dx = -cl}
		else if (cr + dx > this.getWidth()) {
			dx = this.getWidth() - cr};
		if (ct + dy < 0) {
			dy = -ct}
		else if (cb + dy > this.getHeight()) {
			dy = this.getHeight() - cb}};
	this.clip (cl + dx, ct + dy, cr + dx, cb + dy);
	this.moveBy (-dx, -dy);};
function show () {
	if (is.ns4) {
		this.obj.visibility = 'show'}
	else {
		this.obj.style.visibility = "visible"}};
function hide () {
	if (is.ns4) {
		this.obj.visibility = 'hide'}
	else {
		this.obj.style.visibility = "hidden"}};
function alignMiddle () {
	var pageWidth = 1125, leftIndent = 0;
	if (is.ie) {
		leftIndent = (document.body.clientWidth-pageWidth)/2 + 8}
	else {
		leftIndent = (window.innerWidth-pageWidth)/2};
	left = leftIndent + this.pos_x;
	if (left < 15 + this.pos_x) {
		left = 15 + this.pos_x};
	this.moveTo (left, this.pos_y)};
function alignLayers() {
	if (printPageShowing == false) {
		for (var ct=0;ct<myLayers.length;ct++) {
			myObj = eval(myLayers[ct] + "TextObj");
			myObj.layer.alignMiddle ()}
			playfulbottomTextObj.layer.moveTo (left, totalHeight-90);
			}};
function printPage () {
	for (var ct=0;ct<myLayers.length;ct++) {
		myObj = eval (myLayers[ct] + "TextObj");
		myObj.layer.hide()};
	document.bgColor = "#FFFFFF";
	bodyTextObj.layer.moveTo (10,70);
	bodyTextObj.layer.show();
	unprintTextObj.layer.show ();
	printPageShowing = true};
function unprintPage () {
	unprintTextObj.layer.hide ();
	document.bgColor = "#FFFFFF";
	myObj = eval ("bodyTextObj");
	myObj.layer.moveTo (myObj.layer.pos_x, myObj.layer.pos_y);
	printPageShowing = false;
	alignLayers();
	for (var ct=0;ct<myLayers.length;ct++) {
		myObj = eval (myLayers[ct] + "TextObj");
		myObj.layer.show()}};
function switchLanguage (language, region) {
	};
function setCookie (name, value, expireDays) {
	var expiryDate = new Date (), expireString = "";
	if (expireDays > 0) {
		expiryDate.setTime(expiryDate.getTime() + (expireDays * 24 * 3600 * 1000));;
		expireString = "; expires=" + expiryDate.toGMTString ()};
	document.cookie = name + "=" + escape (value) + expireString + "; path=/; domain=insinger.com"};
function getCookie (name) {
	var allCookies = document.cookie.split(";");
	for (var ct=0 ; ct < allCookies.length ; ct++) {
		var myCookie = allCookies[ct].split("=");
		if (myCookie[0].substring(0,1)==' ') {
			myCookie[0]=myCookie[0].substring(1,myCookie[0].length)};
		if (myCookie[0]==name) {
			return unescape (myCookie[1])}};
	return null};
function gotoRegion(toRegion, toLang) {
	setCookie  ("region", toRegion, 90);
	setCookie  ("language", toLang, 90);
	switchLanguage (toLang, toRegion);
	return false;
	};
function resetRegion() {
	setCookie  ("region", "-", 90);
	return false;
	};
function init() {
	if (template == "home") {
		languagePref = getCookie ("language");
		regionPref = getCookie ("region");
		if (languagePref != null && regionPref != null) {
			switchLanguage (languagePref, regionPref)}};
	for (var ct=0;ct<myLayers.length;ct++) {
		myObj = new textObj (myLayers[ct], null, null);
		myObj.layer.pos_x = myObj.layer.x + defaultOffsets[ct];
		myObj.layer.pos_y = myObj.layer.y;
		myObj.layer.alignMiddle ()};
	new textObj ("unprint", null, null);
	unprintTextObj.layer.hide ();
	for (var ct=0;ct<nav.length;ct++) {
		new navObj (nav[ct])};
	window.onresize = alignLayers;
	totalHeight = Math.max(bodyTextObj.layer.getHeight(),navigation2TextObj.layer.getHeight()) + bodyTextObj.layer.y + 15;
	currHeight = backgroundTextObj.layer.getHeight ();
	//accentTextObj.layer.setHeight (totalHeight);
	if (totalHeight > currHeight) {
		backgroundTextObj.layer.setHeight (totalHeight);
		//accentTextObj.layer.setHeight (totalHeight)
		};
	playfulbottomTextObj.layer.moveTo (left, totalHeight-90);
	//backgroundTextObj.layer.setHeight (totalHeight+168);
	initialized = true}
// JavaScript Document