//
function URLEncode (cStr)
	{
	var output = '';
	var x = 0;
	cStr = cStr.toString();
	var regex = /(^[a-zA-Z0-9_.]*)/;
	while (x < cStr.length)
		{
		var match = regex.exec(cStr.substr(x));
		if (match != null && match.length > 1 && match[1] != '')
			{
			output += match[1];
			x += match[1].length;
			}
		else
			{
			if (cStr[x] == ' ') output += '+';
			else
				{
				var charCode = cStr.charCodeAt(x);
				var hexVal = charCode.toString(16);
				output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase();
				}
			x++;
			}
		}
	return output;
	}
//
function GetCompiledText (cStr)
	{
	var cTxt1 = cStr;
	if (cTxt1 == '') return;
	var cTxt2 = 'softib';
	var cTxt3 = cTxt1 + '@' + cTxt2;
	document.write('<a class="Topic" href="' + 'ma' + 'ilto:' + cTxt3 +'.lv">' + cTxt3 + '.lv</a>');
	}
//
function ViewPhotos(cPath, cPicture)
	{
	var cNewUrl = 'viewphotos.asp?code=' + cPath + '&picture=' + cPicture;
	window.open(cNewUrl, '_blank');
	}
//

