<!--
function myOpenLinkInNewWindow( url )
{
	window.open( url, "_blank" ).focus();
	return false;
}

function myChangeUrlsInFrames( url1, target1, url2, target2 )
{
    frame1 = eval( "parent." + target1 );
    frame2 = eval( "parent." + target2 );
    frame1.location.href = url1;
    frame2.location.href = url2;
}

function mySwitchLanguage ( actLangDir, newLangDir )
{
    oldURL = window.location.href;
    actLangDir = '/' + actLangDir + '/';
    newLangDir = '/' + newLangDir + '/';
    posPath = oldURL.indexOf( actLangDir );
    newURL = oldURL.substring( 0, posPath ) + newLangDir + oldURL.substring( posPath + actLangDir.length, oldURL.length );
    window.location.href = newURL;
}

function mySwitchTLD ( actTLD, newTLD )
{
    oldURL = window.location.href;
    posPath = oldURL.indexOf( actTLD );
    newURL = oldURL.substring( 0, posPath ) + newTLD + oldURL.substring( posPath + actTLD.length, oldURL.length );
    window.location.href = newURL;
}

function myReloadPage ( withoutRequestParams )
{
	if ( withoutRequestParams && location.href.indexOf( "?" ) > 0 )
	{
		location.href = location.href.substring( 0, location.href.indexOf( "?" ) );
	}
	else
	{
		location.reload();
	}
}

var MYTARGET_SELF = "_self";
var MYTARGET_BLANK = "_blank";

function myJumpToURL ( url, target )
{
    if( target == null || typeof( target ) == 'undefined' )
    {
        target = MYTARGET_SELF;
    }
    
    if( target == MYTARGET_SELF )
    {
	    location.href = url;
    }
    else if ( target == MYTARGET_BLANK )
    {
        myNewWindow( url );
    }
}

function myGetRandomNr ( start, end )
{
	return Math.floor((end-start+1) * Math.random())+start
}

function myGetArrayEntry( array, value, index )
{
    var returnValue = null;

    index = index != null ? index : 0;

    for ( var i = 0; i < array.length; i++ )
    {
        if( array[i][index] == value )
        {
            returnValue = array[i];
            break;
        }
    }
    return returnValue;
}


// indexTo is optional
function myDeleteArrayEntry ( array, index, indexTo )
{
	var orgArrayLen = array.length;
    var count;

	if ( index < 0 )
	{
		index = 0;
	}
    indexTo = indexTo != null ? indexTo : index + 1;
	if ( indexTo > array.length ) 
	{
		indexTo = array.length;
	}
	count = indexTo - index;
	
    for ( var i = index; i < array.length - count; i++ )
    {
        array[i] = array[i + count]
    }
	array.length = array.length - count;
}

function myInsertEntryInArrayAt( array, value, index )
{
    array.length = array.length + 1;
    
    for( var i = array.length - 1; i > index; i-- )
    {
        array[i] = array[i-1];
    } 

    array[index] = value;
}

function myAddBookmark ( title, url ) 
{
	// firefox
	if ( window.sidebar ) 
	{ 
		window.sidebar.addPanel( title, url,"" ); 
	} 
	// ie
	else if( document.all ) 
	{
		window.external.AddFavorite( url, title );
	} 
}

function myLeftString ( str, lengthFromLeft, suffixIfTooLong )
{
	var returnValue = "";
	
	if ( str != null && str.length > 0 && lengthFromLeft >= 1 )
	{
		if ( lengthFromLeft >= str.length )
		{
			returnValue = str;
		}
		else
		{
			returnValue = str.substring( 0, lengthFromLeft );
			
			if ( suffixIfTooLong != null && suffixIfTooLong.length > 0 )
			{
				returnValue += suffixIfTooLong;
			}
		}
	}
	
	return returnValue;
}
//-->