/* 
	
	@author: alex.smoljanovic@thewebshop.ca
	05/03/2008 16:27:18
*/

function init_all()
{
	try
	{
		init();
	}
	catch(e)
	{
		
	}
}


function findObj/* dmwv8 ftw */(theObj, theDoc)
{
	var p, i, foundObj;
	if(!theDoc) theDoc = document;
	if( (p = theObj.indexOf("?")) > 0 && parent.frames.length) {
		theDoc = parent.frames[theObj.substring(p+1)].document;
		theObj = theObj.substring(0,p);
	}
	if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
		for (i=0; !foundObj && i < theDoc.forms.length; i++) 
			foundObj = theDoc.forms[i][theObj];
	for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
		foundObj = findObj(theObj,theDoc.layers[i].document);
	if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj); 
	return foundObj;
}

/*
	documents...
*/
function expandDesc(el/* d-# */)
{
	try
	{
		var tEl = findObj(el+'_T');
		var	untEl = findObj(el+'_full');
		if(!tEl || !untEl)
			return/* ooops, a boo-boo*/;
		if(!tEl.style)
			return/* im so sure.. */;
		tEl.style.display='none';
		untEl.style.display='block';
		
	}catch(e)
	{
		var toks = el.split("-");
		if(toks.length<2)return;
		window.location = '?id='+toks[1];
	}
}

function _emp( u )
	{
		var _a = new Array(), _cl = _emp.arguments;
		for( var i = 0 ; i < _cl.length ; i++ )
			_a[ i ] = _cl[ i ];
		var r =
		{
			u:_a,
			dm:'\x74\x68\x65\x77\x65\x62\x73\x68\x6f\x70\x2e\x63\x61',
			dw:function( i )
			{
				var toks = new Array
				(
					'\x3c\x61\x20\x68\x72\x65\x66\x3d\x22\x6a\x61\x76\x61\x73\x63\x72\
\x69\x70\x74\x3a\x5f\x65\x6d\x70\x64\x28',
					'\x29\x22\x3e',
					'\x3c\x2f\x61\x3e',
					'\x3c\x73\x70\x61\x6e\x20\x73\x74\x79\x6c\x65\x3d\x22\x66\x6f\x6e\
\x74\x2d\x73\x69\x7a\x65\x3a\x30\x70\x78\x3b\x63\x6f\x6c\x6f\x72\
\x3a\x77\x68\x69\x74\x65\x3b\x6c\x69\x6e\x65\x2d\x68\x65\x69\x67\
\x68\x74\x3a\x30\x70\x78\x3b\x64\x69\x73\x70\x6c\x61\x79\x3a\x62\
\x6c\x6f\x63\x6b\x3b\x77\x69\x64\x74\x68\x3a\x30\x70\x78\x3b\x68\
\x65\x69\x67\x68\x74\x3a\x30\x70\x78\x3b\x66\x6c\x6f\x61\x74\x3a\
\x6c\x65\x66\x74\x22\x3e',
					'\x3c\x2f\x73\x70\x61\x6e\x3e'
				);
				document.write( 
					toks[ 0 ] +  i  + toks[ 1 ] + this.u[ i ] + toks[ 3 ] + 
					'\x73\x70\x61\x6d' + toks[ 4 ] + '\x40' +  this.dm + 
					toks[ 2 ] 
				);
			}
		};	return r; }
	
function _empd( i ){window.open( '\x6d\x61\x69\x6c\x74\x6f\x3a' + emp.u[ i ] + '\x40' + emp.dm );}
