// check for unsupported browser and redirect
/*if (navigator.userAgent.indexOf("WebKit") > -1) {
	top.location.href = '/info/unsupported_browser.html';
}*/

	String.prototype.UnEscapeString = function(){
		var strValue = this;
		aryEscapeCodes = new Array( '%3A,:', '%2F,/', '%2E,.', '%5F,_', '%26,&', '%3D,=', '%2B,+' );
		for( intCodes = 0; intCodes < aryEscapeCodes.length; intCodes++ ){
			aryTemp = aryEscapeCodes[intCodes].split( ',' );
			objRegExp = new RegExp( '\\' + aryTemp[0], 'gi' );
			strValue = strValue.replace( objRegExp, aryTemp[1] );
		}
		return strValue;
	};

	function $OC( strOpCode, strLID, strDefaultAction ){
		var objDate = new Date();
		var intTime = objDate.getTime();
		var strExp = ( Math.round( intTime / 1000 ) + 60 ) + ( objDate.getTimezoneOffset() * 60 );
//		alert(navigator.userAgent);
//		alert(strLID);
		if( navigator.userAgent.indexOf("MSIE") < 0 )
			var objPlugin = document.embeds['objNapsterPlugin'];
		else
			var objPlugin = document.getElementById( 'objNapsterPlugin' );
		var blnSuccess = false;
        if (strOpCode.indexOf('op=') > -1)
        	strOpCode = strOpCode.substring( 3 );

		strOpCode = strOpCode.UnEscapeString();
//		alert(strOpCode);
		try{
			objPlugin.NCOMAuth2( strLID.UnEscapeString(), strExp, 'op=' + strOpCode );
			blnSuccess = true;
		}
		catch(e){
			try{
				objPlugin.DoOpcode( strOpCode );
				blnSuccess = true;
			}
			catch(e){
				try{
					if( strDefaultAction != null ){
						eval( strDefaultAction );
						blnSuccess = true;
					}
				}
				catch(e){
					blnSuccess = false;
				}
			}
		}
		return blnSuccess;
	}

