var baseHREF = ""; // base path 
var mytitle = document.title;
var Path = '/';
var sRSS = "";
var bw = 0
var aladdinsoffset = 0;
var ver = "";
var txtimg;
var txtlogo = '"/images/aladd.png"';
var txtlogo2;
var txtProduct;
var txtTryIt;
var verpos;
var pagewidth = 990;
var pageheight = 0;
var mp = "";

var ns4 = false;
if ((navigator.userAgent.toLowerCase().indexOf('mozilla') != -1) && (parseInt(navigator.appVersion) >= 4)) {
	ns4 = true;
}

var op5 = false;
if ((navigator.userAgent.toLowerCase().indexOf('opera') != -1) && (parseInt(navigator.appVersion) >= 5)) {
	op5 = true;
}

isOK = false;
if (ns4) vPADDING = 4;
//** LINKS ***********************************************************

function layerstart(left, top, width, id, z) {
	if (id != '') id = ' id="' + id + '"';
	if (z != '') z = ';z-index:' + z;
	if ((document.all) || op5 || (document.getElementById)) {
		document.write('<div' + id + ' style="position: absolute; left:' + left + 'px; top:' + top + 'px; width:' + width + 'px' + z + '";>');
	}
	else {
		document.write('<layer style="left:' + left + 'px;top:' + top + 'px;width:' + width + 'px">');
	}
};

function layerend() {
	if ((document.all) || op5 || (document.getElementById)) {
		document.write('</div>');
	}
	else {
		document.write('</layer>');
	}
};

function calcAladdinsAdjust() {

	if (self.innerHeight) // all except Explorer
	{
		bw = self.innerWidth - 17;
		pageheight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
	{
		bw = document.documentElement.clientWidth;
		pageheight = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		bw = document.body.clientWidth;
		pageheight = document.body.clientHeight;
	}

	aladdinsoffset = (bw - 990) / 2;
	if (aladdinsoffset < 0) aladdinsoffset = 0;

}

function AdjustUpperObjects() {
	calcAladdinsAdjust();

	var obj
	obj = document.getElementById('maincontainer');
	if (obj) {
		obj.style.marginLeft = aladdinsoffset + 'px';
	}
	//	    obj = document.getElementById('Facebook');
	//	    if (obj) {
	//	        obj.style.left = aladdinsoffset + 778 +'px';
	//	    }

	obj = document.getElementById('ProductText');
	if (obj) {
		obj.style.left = aladdinsoffset + 220 + 'px';
	}

//	obj = document.getElementById('LiveSupport');
//	if (obj) {
//		obj.style.left = aladdinsoffset + 875 + 'px';
	}

}
window.onresize = function () {
	AdjustUpperObjects();
}
mp = 'http://office.microsoft.com/en-us/providers/PN040064364.aspx';

if (product == "EL") {
	isOK = true;
	txtProduct = 'el_text.png';
	txtTryIt = 'AladdinsELP.exe';
	mp = 'http://office.microsoft.com/en-us/marketplace/aladdins-envelopes-labels-EM001069662.aspx';
	verpos = 400;
}

if (product == "OD") {
	isOK = true;
	txtProduct = 'od_text.png';
	txtTryIt = 'AladdinsOD4.exe';
	verpos = 380;
	mp = 'http://office.microsoft.com/en-us/marketplace/aladdins-office-documents-EM001206042.aspx';
}

if (product == "CO") {
	isOK = true;
	txtProduct = 'co_text.png';
	txtTryIt = 'AladdinsCO.exe';
	verpos = 295;
	mp = 'http://office.microsoft.com/en-us/marketplace/aladdins-categoriez-EM010232508.aspx';
}

if (product == "LO") {
	isOK = true;
	txtProduct = 'lo_text.png';
	txtTryIt = 'AladdinsLO.exe';
	verpos = 395;

}

if (isOK == false) {
	isOK = true;
	txtProduct = ""
}

calcAladdinsAdjust();


if (txtProduct != '') {
//	layerstart(aladdinsoffset + 220, 20, 0, 'ProductText', 5);
//	document.write('<table border=0><tr><td nowrap><img border="0" src="/images/' + txtProduct + '"></tr></table>');
//	layerend();
}


if (mytitle.indexOf('Forum') == -1) {
	//    layerstart(aladdinsoffset + 778, 48, 0, 'Facebook', 6)
	//		document.write('<fb:like href="http://www.software-solutions.co.nz/default.asp" show_faces="false" layout="button_count" width="100px"></fb:like>')
	//	layerend();

//	layerstart(aladdinsoffset + 875, 22, 0, 'LiveSupport', 7)
//	document.write('<!-- BEGIN ProvideSupport.com Graphics Chat Button Code -->');
//	document.write('<div id="ciPq5E" style="z-index:100;position:absolute"></div><div id="scPq5E" style="display:inline"></div>');
//	document.write('<div id="sdPq5E" style="display:none"></div><script type="text/javascript">var sePq5E=document.createElement("script");')
//	document.write('sePq5E.type="text/javascript";');
//	document.write('var sePq5Es=(location.protocol.indexOf("https")==0?"https":"http")+"://image.providesupport.com/js/aladdinssupport/safe-standard.js?ps_h=Pq5E&ps_t="+new Date().getTime();');
//	document.write('setTimeout("sePq5E.src=sePq5Es;document.getElementById(\'sdPq5E\').appendChild(sePq5E)",1)</script>');
//	document.write('<noscript><div style="display:inline"><a href="http://www.providesupport.com?messenger=aladdinssupport">Live Support</a></div></noscript>');
//	document.write('<!-- END ProvideSupport.com Graphics Chat Button Code -->');
//	layerend();
}

if (mytitle.indexOf('Welcome Office Update') != -1) {
	layerstart(aladdinsoffset + bw - 300, 35, 0, '');
	document.write('<a href="http://office.microsoft.com/"><img border="0" src="/images/officeupdate3.gif" style="width:114px; height:31px;"></a>');
	layerend();
}

/*	document.write('<div id="fb-root"></div>')
document.write('<script>')
document.write('  window.fbAsyncInit = function() {')
document.write('    FB.init({appId: \'your app id\', status: true, cookie: true,xfbml: true});')
document.write('  };')
document.write('  (function() {')
document.write('    var e = document.createElement(\'script\'); e.async = true;')
document.write('    e.src = document.location.protocol +')
document.write('      \'//connect.facebook.net/en_US/all.js\';')
document.write('    document.getElementById(\'fb-root\').appendChild(e);')
document.write('  }());')
document.write('</script>')
*/
document.write('<div id="maincontainer" style="width:' + pagewidth + 'px;margin-left:' + (aladdinsoffset) + 'px">');
document.write('  <div id="container2">');
document.write('    <div id="container1">');
document.write('      <div id="col1">');
document.write('        <div class="topbar" style="width:150px;height:20px;">&nbsp;')
document.write('        </div>');
document.write('        <div class="topbar3" style="width:150px;height:56px;border:0px solid green">');
document.write('        <div style="display:block;position:relative;left:10px;border:0px">');
document.write('          <img style="border:0px;" src="/images/aladd.png">');
document.write('        </div>');
document.write('        </div>');
