function processCommand(g,h,d){var c="ProcessRequest";var b="<FromLinkCommand>";var a="MyUserId=$userId$&PasswordHash=$passwordHash$&";try{if(IMWC_OPENSECURE_VERSION_TSH<=(IMWC.GetFullVersion().substring(0,3)*1)){a=""}}catch(f){}switch(g){case"buy":if(xmlData=isDataValid(d)){b+="<Purchase><Items>"+xmlData+"</Items></Purchase>"}else{return false}break;case"download":if(xmlData=isDataValid(d)){b+="<PremiumDownload><Items>"+xmlData+"</Items></PremiumDownload>"}else{return false}break;case"freedownload":if(xmlData=isDataValid(d)){b+="<FreeDownload><Items>"+xmlData+"</Items></FreeDownload>"}else{return false}break;case"track":b+="<OpenSecureDiscovery><ForceReload/><URL>"+host+"/discovery/track.html?"+a+"id="+h+"&idType=MNId&useGenre=false</URL></OpenSecureDiscovery>";break;case"album":b+="<OpenSecureDiscovery><ForceReload/><URL>"+host+"/discovery/album.html?"+a+"id="+h+"&idType=MNId&useGenre=false</URL></OpenSecureDiscovery>";break;case"artist":b+="<OpenSecureDiscovery><ForceReload/><URL>"+host+"/discovery/artist.html?"+a+"id="+h+"&idType=MNId&useGenre=false</URL></OpenSecureDiscovery>";break;case"playlist":b+="<OpenPlaylist><PlaylistID>"+h+"</PlaylistID></OpenPlaylist>";break;case"account":b+="<OpenAccount><Page>"+h+"</Page></OpenAccount>";break;case"discovery":b+="<OpenDiscovery><ForceReload/><URL></URL></OpenDiscovery>";break;case"dialog":b+="<OpenWebDialog><URL>"+decodeURIComponent(d)+"</URL></OpenWebDialog>";break;case"messages":case"fRequest":if(a!=""){a="?"+a.substring(0,a.length-1)}b+="<OpenSecureDiscovery><URL>"+communityHost+"/people/messages.html"+a+"</URL></OpenSecureDiscovery>";break;case"comments":if(a!=""){a="?"+a.substring(0,a.length-1)}b+="<OpenSecureDiscovery><ForceReload/><URL>"+communityHost+"/people/editComments.html"+a+"</URL></OpenSecureDiscovery>";break;case"profile":b+="<OpenSecureDiscovery><ForceReload/><URL>"+communityHost+"/people/profile.php?"+a+"UserId="+h+"</URL></OpenSecureDiscovery>";break;case"gallery":b+="<OpenSecureDiscovery><ForceReload/><URL>"+communityHost+"/people/gallery.html?"+a+"UserId="+h+"</URL></OpenSecureDiscovery>";break;case"pictureview":b+="<OpenSecureDiscovery><ForceReload/><URL>"+communityHost+"/people/pictureView.html?"+a+"UserId="+h+"&id="+decodeURIComponent(d)+"</URL></OpenSecureDiscovery>";break;case"userhome":b+="<OpenCommunity><ForceReload/></OpenCommunity>";break;case"launch":case"default":c="Launch";break}b+="</FromLinkCommand>";return processRequest(c,b)}function processRequest(commandType,request){if(commandType=="Launch"){commandType="ProcessRequest"}if((commandType=="ProcessRequest")){objCommand=commandType+'("'+request+'")';try{eval("IMWC."+objCommand);return true}catch(e){return false}}}function isDataValid(b){try{var a=decodeURIComponent(b).replace(/"/gi,'\\"');var c=new ActiveXObject("Microsoft.XMLDOM");c.validateOnParse=true;c.async=false;c.loadXML(a);if(c.parseError.errorCode!="0"){return false}}catch(d){return false}return a};