<!-- Hide script from old browsers
// Make sure file is not hosted in a different frameset
if ( top.location.href != window.location.href )
  { top.location.href=window.location.href }

	function go_l(f) {
		if(f != '0'){
			if(f.substring(0,4) != 'http') location.href=f;
			else window.open(f);
		}else return
	}

    function openWindow(url, w, h) {
        var windowprops = "width=" + w + ",height=" + h +",,left=50,top=50,scrollbars=yes,status=yes,toolbar=no,location=no,directories=no,resizable=yes";
          popup = window.open(url,'newWin',windowprops);
          popup.focus();
           } 
        
	function openPicture(pic,w,h) {
     
		var windowprops = "left=160,top=100,scrollbars=no,status=yes,toolbar=no,location=no,directories=no,resizable=yes,width=" + w + ",height=" + h;
          
		picture = window.open('','newPicture',windowprops);
		picture.close();
        picture = window.open('','newPicture',windowprops);  
        picture.focus();
        
		picture.document.write("<html><head><title>Picture<\/title><\/head><body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>")
		picture.document.writeln("<img src=" + pic + " width=" + w + " height=" + h + ">")
		picture.document.write("<\/body><\/html>")
	}                
 
function showdate()
{
	
		// Determine the current date and display it
   	var today = new Date();
   	var day = today.getDay();
   	var date = today.getDate();
   	var month = today.getMonth();
   	var year = today.getFullYear();
   	
   		//January,February,March,April,May,June,July,August,September,October,November,December
   	if (month == 0) {month='Jan'};
   	if (month == 1) {month='Feb'};
   	if (month == 2) {month='Mar'};
   	if (month == 3) {month='Apr'};
   	if (month == 4) {month='May'};
   	if (month == 5) {month='Jun'};
   	if (month == 6) {month='Jul'};
   	if (month == 7) {month='Aug'};
   	if (month == 8) {month='Sept'};
   	if (month == 9) {month='Oct'};
   	if (month == 10) {month='Nov'};
   	if (month == 11) {month='Dec'};
   
   	if (day == 0) {day='Sunday'};
   	if (day == 1) {day='Monday'};
   	if (day == 2) {day='Tuesday'};
   	if (day == 3) {day='Wednesday'};
   	if (day == 4) {day='Thursday'};
   	if (day == 5) {day='Friday'};
   	if (day == 6) {day='Saturday'};
   
   if ( document.all ) {
		document.write ('<span class="small">&nbsp;&nbsp;' + day + ', ' + month +  ' ' + date + ', ' + year + '</span>');
	} else {
		document.write ('<span class="smallNC">&nbsp;&nbsp;' + day + ', ' + month +  ' ' + date + ', ' + year +  '</span>');
	}
   
   
}

function switchClass(obj,strClassName) {
		obj.className	= strClassName;
	}
	
function gotoURL(strUrl) {
		location = strUrl;
	}

function copyrightYear(startYear)
	{
		d = new Date();
		
		if (startYear != d.getFullYear())
			{
			return startYear + " - " + d.getFullYear();
			}
		else
			{
			return startYear;
			}
	}
	
	// Show current date in format "Nov 15, 2003".		
function nsDate()
{
		// Get today's date.
	var sDate = new Date();
	var sToday = "";
	
		// Array with months.
	var aMonths = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
	
		// Get current month.
	var iMonth = sDate.getMonth();
		
		// Get current hour,minute,second.
	var iHours   = sDate.getHours();
	var iMinutes = sDate.getMinutes();
	var iSeconds = sDate.getSeconds();
			
	sToday = "";
		// Get today's date string.
	sToday += aMonths[iMonth] + " ";
	sToday += sDate.getDate() + ", ";
	sToday += sDate.getFullYear() + " ";

		// Display the date on the screen.
	document.write("<b>"+sToday+"</b>");	
}

	// Get the current date in format "Nov 15, 2003  12:53:23 pm".
function today()
{
	var ie4=document.all;
    var ns4=document.layers;
    var ns6=document.getElementById&&!document.all;
    	
		// Get today's date.
	var sDate = new Date();
	var sToday = "";
	
		// Array with months.
	var aMonths = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
	
		// Get current month.
	var iMonth = sDate.getMonth();
		
		// Get current hour,minute,second.
	var iHours   = sDate.getHours();
	var iMinutes = sDate.getMinutes();
	var iSeconds = sDate.getSeconds();
	
		// If iHour > 12.
	if(iHours>12)
		iHours = iHours - 12;
	
	if(iMinutes < 10)
		iMinutes = "0" + iMinutes;
		
	if(iSeconds < 10)
		iSeconds = "0" + iSeconds;
	
	sToday = "";
		// Get today's date string.
	sToday += aMonths[iMonth] + " ";
	sToday += sDate.getDate() + ", ";
	sToday += sDate.getFullYear() + " ";
	
	sToday += iHours + ":";
	sToday += iMinutes + ":" ;
	sToday += iSeconds; 

	
		// Set am or pm
	if(sDate.getHours() < 12)
		sToday += " am ";
	else
		sToday += " pm ";
	
		// Display the date on the screen.
	
		// Write the clock to the layer:
	if (ns4) 
	{
		return;
	} 
	else 
		if (ie4) 
		{
			document.getElementById("LiveClock").innerHTML = "<b>"+sToday+"</b>";
		}	 
		else 
			if (ns6)
			{
				document.getElementById("LiveClock").innerHTML = "<b>"+sToday+"</b>";
            }            
	
		setTimeout("today()",1000);
		//window.setInterval(today(),100);
}	


function openWindow2(url,wname,w,h,props) 
{
	var winTop=(screen.height-h)/2;
	var winLeft=(screen.width-w)/2;
	
	var windowprops = "width=" + w + ",height=" + h +",left="+winLeft+",top="+winTop+","+props;
	return window.open(url,wname,windowprops);
}  










function validateEmail(email)
{
	if ((email.length < 3) || (email.length > 50) || 
			(email.charAt(0) == '@') || (email.charAt(email.length-1) == '@') || 
			(email.charAt(0) == '.') || (email.charAt(email.length-1) == '.') || 
			(email.indexOf('.') == -1) || (email.indexOf('@') == -1) ||
			(email.indexOf('@') != email.lastIndexOf('@')) || 
			(email.indexOf(' ') > 0) || (email.indexOf('?') > 0) || (email.indexOf('..') > 0)
			)
	{
		return false;
	}
	else
	{
		return true;
	}
} 


function validateEmailMV(email, strict)
{
	if(email.length == 0) {
		errorMsg += "\nPlease enter your email address.";
		return false;
	}
	valid_chars = "[^ \(\)<>@,;:\\\"\[\]]";
	
	switch(strict) {
		case 1:
			if(!email.match("^.{2,}@.+$")) {
				errorMsg += "\nPlease supply a valid email address.";
				return false;
			} else {
				return true;
			}

			break;
		case 2:
			re = /^[^ \(\)<>@,;:\\\"\[\]]{2,}@[^ \(\)<>@,;:\\\"\[\]]+$/;
			reQuotas = /^\".*\"@[^ \(\)<>@,;:\\\"\[\]]+$/;
			if (reQuotas.test(email)) {
				return true;
			} else if(!re.test(email)) {
				errorMsg += "\nPlease supply a valid email address.";
				return false;
			} else {
				return true;
			}

			break;
		case 3:
			reQuotas = /^\".*\"@[^ \(\)<>@,;:\\\"\[\]]+\.[^ \(\)<>@,;:\\\"\[\]]+$/;
			re = /^[^ \(\)<>@,;:\\\"\[\]]{2,}@[^ \(\)<>@,;:\\\"\[\]]+\.[^ \(\)<>@,;:\\\"\[\]]+$/
			if (reQuotas.test(email)) {
				return true;
			}
			if(!re.test(email)) {
				errorMsg += "\nPlease supply a valid email address.";
				return false;
			} else {
				return true;
			}
			
			break;
	}

}


function popUpMV(page, h, w, left, top, resize, scrollbars)
{
	resWin = window.open(page, "", "dependent, height=" + h + ", width=" + w + ", left=" + left + ", top=" + top + ", resizable=" + resize + ", scrollbars=" + scrollbars);
}

//table list actions


function datalistRowOver(rowId)
{
	var rowDom = document.getElementById(rowId);
	
	var aElements = rowDom.getElementsByTagName('td');
	
	for(i = 0; i < aElements.length; i++) {
		aElements[i].style.backgroundColor = datalistColors['over'];
//		aElements[i].className = 'datalistover';

	}
}

function datalistRowOut(rowId, defaltColor)
{
	var rowDom = document.getElementById(rowId);
	
	var aElements = rowDom.getElementsByTagName('td');
	
	for(i = 0; i < aElements.length; i++) {
		aElements[i].style.backgroundColor = defaltColor;
//		aElements[i].className = 'datalistout';
	}
}

function datalistRowClick(rowId)
{
	var rowDom = document.getElementById(rowId);
	
	var aElements = rowDom.getElementsByTagName('td');
	
	for(i = 0; i < aElements.length; i++) {
		aElements[i].style.backgroundColor = datalistColors['click'];
//		aElements[i].className = 'datalistclick';
	}
}
//table list actions end

function confirmDeleteMV(item)
{
	if(confirm('Delete ' + item + '?')) {
		return true;
	} else {
		return false;
	}
}

function switchClass(obj,strClassName)
{
	obj.className	= strClassName;
}

function deleteConfirm(question, idPart)
{
	var inputsDom = document.getElementsByTagName("input");
	var re = new RegExp(idPart, "i")
	
	for(i = 0; i < inputsDom.length; i++) {
		if(re.test(inputsDom[i].id)) {
			// Check if it is checked
			if(inputsDom[i].checked == true) {
				return confirm(question);
			}
		}
	}
	
	return true;
}

function uncheckAll(uniqueId)
{
	var inputsDom = document.getElementsByTagName("input");
	var re = new RegExp(uniqueId, "i")
	
	for(i = 0; i < inputsDom.length; i++) {
		if(re.test(inputsDom[i].id)) {
			inputsDom[i].checked = false;
		}
	}
}

function confirmDelete(item)
{
	if(confirm('Delete ' + item + '?')) {
		return true;
	} else {
		return false;
	}
}

// End hiding script from old browsers -->



// Fix for flash

function EmbedTopFlash()
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="header" width="736" height="119" align="middle">');
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<param name="movie" value="header.swf" />');
	document.write('<param name="menu" value="false" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<embed src="header.swf" menu="false" quality="high" wmode="transparent" bgcolor="#ffffff" width="736" height="119" swLiveConnect=true id="header" name="header" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function EmbedHomeFlash()
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="368" height="305" id="homeslide" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="homeslide.swf" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="homeslide.swf" menu="false" quality="high" wmode="transparent" bgcolor="#ffffff" width="368" height="305" name="homeslide" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function EmbedContactFlash()
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="650" height="467" id="contactmap" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="tym-map.swf" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="tym-map.swf" menu="false" quality="high" wmode="transparent" bgcolor="#ffffff" width="650" height="467" name="contactmap" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function EmbedSupportFlash()
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="650" height="467" id="supportmap" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="tym-support.swf" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="tym-support.swf" menu="false" quality="high" wmode="transparent" bgcolor="#ffffff" width="650" height="467" name="supportmap" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
function EmbedNewsFlash()
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="368" height="150" id="news" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="news.swf" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="news.swf" menu="false" quality="high" wmode="transparent" bgcolor="#ffffff" width="368" height="150" name="news" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

