
function writeFlash(movieLocation,flashwidth,flashheight,noflashsrc,noflashurl,myidname) {
	if (myidname) { document.write('<div id="'+myidname+'">'); }
	if ((noflashsrc) && ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)) )) {
		if (noflashurl) { document.write('<a href="'+noflashurl+'" >');}
		if (noflashsrc) { document.write('<img src="'+noflashsrc+'" />');}
		if (noflashurl) { document.write('</a>');}
	} else {
		document.write('<object type="application/x-shockwave-flash" width="'+flashwidth+'" height="'+flashheight+'" data="'+movieLocation+'"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+movieLocation+'" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="wmode" value="transparent" /></object>');
	}

	if (myidname) { document.write('</div>'); }
}



function getElement(elementx)
{	var elem;
		if (navigator.appName == 'Microsoft Internet Explorer')
			elem = document.all(elementx);
		else
		{
		    if (navigator.appName == 'Opera')
		        elem = document.getElementById(elementx);
		    else
		    {
			    elem = document.getElementById(elementx);
			    if (elem==null) // get element by index number
				    elem = document.forms[0].elements[elementx];
			}
		}
	return elem;
}

function openWin(aPage,aPageID,iWidth,iHeight) {
	var sWindowInfo;
	sWindowInfo = "resizable=yes,width=" +iWidth+ ",height=" + iHeight + ",top=0,left=0,toolbar=no, status=yes, scrollbars=no";
	var aWin = window.open(aPage, aPageID, sWindowInfo);
	return aWin;
}

function openWinSB(aPage,aPageID,iWidth,iHeight) {
	var sWindowInfo;
	sWindowInfo = "resizable=yes,width=" +iWidth+ ",height=" + iHeight + ",top=0,left=0,toolbar=no, status=yes, scrollbars=yes";
	var aWin = window.open(aPage, aPageID, sWindowInfo);
	return aWin;
}

/****************************************************
 AntiSpambotMailto() - Documentation and encoder at:
    http://www.kenric.com/AntiSpambotMailto.html
****************************************************/
function AntiSpambotMailto(codelist, description, atagattr) {
	var thiscode, thischar;
	var CodeString = new String(codelist);
	var CodedArray = CodeString.split('|');
	var L = CodedArray.length;
	var AddrDecoded = "";
	for (var x=0; x < L; x++) {
		thiscode = CodedArray[x];
		thischar = String.fromCharCode( thiscode - L );
		AddrDecoded += thischar;
	}
	atagattr = atagattr ? ' ' + atagattr : '';
	if (!description) description = AddrDecoded; // if no description supplied, display email address
	var strOutput = '<a href="mailto:'+AddrDecoded+'"' + atagattr+'>' + description + '</a>';
	document.write(strOutput);
}

