function AddArticleToShoppingCart(articleNo, sessionId) {
	var url = shopUrlPrefix + shopParamSessionId + sessionId + shopParamArticleId + articleNo + shopUrlPostfix;
	try {
			if ( typeof( opener ) == "undefined" || typeof( opener ) == "unknown" ||
			    	typeof( opener.name ) == "undefined" || typeof( opener.name ) == "unknown" )
			{
				if ( tradeProWindow.closed )	
				{
					tradeProWindow = window.open(url, "shop", "" );
					tradeProWindow.focus();
				}
				else 
				{
					tradeProWindow.location.href=url;
					tradeProWindow.focus();	
				}
			} 
			else 
			{
				opener.location.href = url;
				opener.focus();
			}
		} 
		catch ( Exception )
		{
			if( opener && !opener.closed )
			{
				opener.location.href = url;
				opener.focus();
			}
			else 
			{
				try {
					if ( tradeProWindow.closed )	
					{
						tradeProWindow = window.open( url, "shop", "" );
						tradeProWindow.focus();
					}
					else 
					{
						tradeProWindow.location.href = url;
						tradeProWindow.focus();	
					}
				} 
				catch ( Exception )
				{
						tradeProWindow = window.open( url, "shop", "" );
						tradeProWindow.focus();
				}
			}
		}
}

function GotoUrl(url) {
		window.open( url, "_blank", "" );
}

function gotoPage(pageNo) {
    thisMovie("flipcatalog").page(pageNo);
}

function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}

function getUrlParam( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}
