Moviemates

From OpenSocial Directory

Jump to: navigation, search
Thumbnail
thumb1.png
Application Details
Description Filmkritiken für Kinofilme und DVD Filme auf der Film-Community moviemates- Zeig Deinen Freunden Deine Filmbewertungen, spiel das Filmquiz, sieh Dir Filmclips und Bilder von Stars an und vieles mehr.
Publisher Moviemates.de
Author Siegi
Code http://app.moviemates.de/OpenSocial/moviemates.xml
Genre Video
Containers Ning

Image:Example.jpg==Reviews== Add a Review
Template:Moviemates Reviews

[edit] Comments

Leave a comment

Your Name:
Heading:
Comment:


[edit] Code

View Code

  <?xml version="1.0" encoding="UTF-8" ?> 
  <Module>
  <ModulePrefs title="moviemates.de" thumbnail="http://app.moviemates.de/OpenSocial/img/thumb1.png" title_url="http://moviemates.de" directory_title="moviemates.de" height="350" author="Siegmund Gorr" author_affiliation="moviemates.de" author_link="https://www.xing.com/profile/Siegmund_Gorr" description="Filmkritiken für Kinofilme und DVD Filme auf der Film-Community moviemates- Zeig Deinen Freunden Deine Filmbewertungen, spiel das Filmquiz, sieh Dir Filmclips und Bilder von Stars an und vieles mehr.">
  <Require feature="opensocial-0.5" /> 
  <Require feature="dynamic-height" /> 
  <Require feature="analytics" /> 
  <Locale lang="en" country="US" /> 
  <Locale lang="en" country="GB" /> 
  <Locale lang="de" country="DE" /> 
  <Locale lang="de" country="AT" /> 
  <Locale lang="de" country="CH" /> 
  </ModulePrefs>
  <Content type="html">
  <![CDATA[ 
  <script type="text/javascript" src="http://app.moviemates.de/yui/yahoo/yahoo-min.js"></script>   
  <script type="text/javascript" src="http://app.moviemates.de/yui/event/event-min.js"></script> 
  <script type="text/javascript" src="http://app.moviemates.de/yui/connection/connection-min.js"></script>
  <link rel="stylesheet" type="text/css" href="http://app.moviemates.de/yui/tabview/assets/skins/sam/tabview.css" />
  <link rel="stylesheet" type="text/css" href="http://app.moviemates.de/OpenSocial/default.css" />
  <link rel="stylesheet" type="text/css" href="http://app.moviemates.de/OpenSocial/osyui.css" />
	<script type="text/javascript" src="http://app.moviemates.de/yui/yahoo-dom-event/yahoo-dom-event.js"></script>
	<script type="text/javascript" src="http://app.moviemates.de/yui/element/element-beta-min.js"></script>
	<script type="text/javascript" src="http://app.moviemates.de/yui/connection/connection-min.js"></script>
	<script type="text/javascript" src="http://app.moviemates.de/yui/tabview/tabview-min.js"></script>   
  <script type="text/javascript" src="http://app.moviemates.de/OpenSocial/osmmi.js"></script> 
  <script type="text/javascript">
_IG_RegisterOnloadHandler(osmm_request);

</script>
<div id='main'><img src="http://app.moviemates.de/OpenSocial/img/wait.gif" alt="Bitte warten ..." /></div>
  

  ]]> 
  </Content>
  </Module>

http://app.moviemates.de/OpenSocial/osmmi.js

// OSMM
var osmm_lt = false;
var osmm_gp = null;
// START YAHOO
/*
Copyright (c) 2007, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.3.1
*/

(function() {
    var Dom = YAHOO.util.Dom,
        Event = YAHOO.util.Event;
    
    /**
     * A representation of a Tab's label and content.
     * @namespace YAHOO.widget
     * @class Tab
     * @extends YAHOO.util.Element
     * @constructor
     * @param element {HTMLElement | String} (optional) The html element that 
     * represents the TabView. An element will be created if none provided.
     * @param {Object} properties A key map of initial properties
     */
    var Tab2 = function(el, attr) {
        attr = attr || {};
        if (arguments.length == 1 && !YAHOO.lang.isString(el) && !el.nodeName) {
            attr = el;
            el = attr.element;
        }

        if (!el && !attr.element) {
            el = _createTabElement.call(this, attr);
        }

        this.loadHandler =  {
            success: function(o) {
                this.set('content', o.responseText);
            },
            failure: function(o) {
            }
        };
        
        Tab2.superclass.constructor.call(this, el, attr);
        
        this.DOM_EVENTS = {}; // delegating to tabView
    };

    YAHOO.extend(Tab2, YAHOO.util.Element);
    var proto = Tab2.prototype;
    
    /**
     * The default tag name for a Tab's inner element.
     * @property LABEL_INNER_TAGNAME
     * @type String
     * @default "em"
     */
    proto.LABEL_TAGNAME = 'em';
    
    /**
     * The class name applied to active tabs.
     * @property ACTIVE_CLASSNAME
     * @type String
     * @default "selected"
     */
    proto.ACTIVE_CLASSNAME = 'selected';
    
    /**
     * The class name applied to disabled tabs.
     * @property DISABLED_CLASSNAME
     * @type String
     * @default "disabled"
     */
    proto.DISABLED_CLASSNAME = 'disabled';
    
    /**
     * The class name applied to dynamic tabs while loading.
     * @property LOADING_CLASSNAME
     * @type String
     * @default "disabled"
     */
    proto.LOADING_CLASSNAME = 'loading';

    /**
     * Provides a reference to the connection request object when data is
     * loaded dynamically.
     * @property dataConnection
     * @type Object
     */
    proto.dataConnection = null;
    
    /**
     * Object containing success and failure callbacks for loading data.
     * @property loadHandler
     * @type object
     */
    proto.loadHandler = null;

    proto._loading = false;
    
    /**
     * Provides a readable name for the tab.
     * @method toString
     * @return String
     */
    proto.toString = function() {
        var el = this.get('element');
        var id = el.id || el.tagName;
        return "Tab " + id; 
    };
    
    /**
     * setAttributeConfigs TabView specific properties.
     * @method initAttributes
     * @param {Object} attr Hash of initial attributes
     */
    proto.initAttributes = function(attr) {
        attr = attr || {};
        Tab2.superclass.initAttributes.call(this, attr);
        
        var el = this.get('element');
        
        /**
         * The event that triggers the tab's activation.
         * @attribute activationEvent
         * @type String
         */
        this.setAttributeConfig('activationEvent', {
            value: attr.activationEvent || 'click'
        });        

        /**
         * The element that contains the tab's label.
         * @attribute labelEl
         * @type HTMLElement
         */
        this.setAttributeConfig('labelEl', {
            value: attr.labelEl || _getlabelEl.call(this),
            method: function(value) {
                var current = this.get('labelEl');

                if (current) {
                    if (current == value) {
                        return false; // already set
                    }
                    
                    this.replaceChild(value, current);
                } else if (el.firstChild) { // ensure label is firstChild by default
                    this.insertBefore(value, el.firstChild);
                } else {
                    this.appendChild(value);
                }  
            } 
        });

        /**
         * The tab's label text (or innerHTML).
         * @attribute label
         * @type String
         */
        this.setAttributeConfig('label', {
            value: attr.label || _getLabel.call(this),
            method: function(value) {
                var labelEl = this.get('labelEl');
                if (!labelEl) { // create if needed
                    this.set('labelEl', _createlabelEl.call(this));
                }
                
                _setLabel.call(this, value);
            }
        });
        
        /**
         * The HTMLElement that contains the tab's content.
         * @attribute contentEl
         * @type HTMLElement
         */
        this.setAttributeConfig('contentEl', {
            value: attr.contentEl || document.createElement('div'),
            method: function(value) {
                var current = this.get('contentEl');

                if (current) {
                    if (current == value) {
                        return false; // already set
                    }
                    this.replaceChild(value, current);
                }
            }
        });
        
        /**
         * The tab's content.
         * @attribute content
         * @type String
         */
        this.setAttributeConfig('content', {
            value: attr.content,
            method: function(value) {
                this.get('contentEl').innerHTML = value;
            }
        });

        var _dataLoaded = false;
        
        /**
         * The tab's data source, used for loading content dynamically.
         * @attribute dataSrc
         * @type String
         */
        this.setAttributeConfig('dataSrc', {
            value: attr.dataSrc
        });
        
        /**
         * Whether or not content should be reloaded for every view.
         * @attribute cacheData
         * @type Boolean
         * @default false
         */
        this.setAttributeConfig('cacheData', {
            value: attr.cacheData || false,
            validator: YAHOO.lang.isBoolean
        });
        
        /**
         * The method to use for the data request.
         * @attribute loadMethod
         * @type String
         * @default "GET"
         */
        this.setAttributeConfig('loadMethod', {
            value: attr.loadMethod || 'GET',
            validator: YAHOO.lang.isString
        });

        /**
         * Whether or not any data has been loaded from the server.
         * @attribute dataLoaded
         * @type Boolean
         */        
        this.setAttributeConfig('dataLoaded', {
            value: false,
            validator: YAHOO.lang.isBoolean,
            writeOnce: true
        });
        
        /**
         * Number if milliseconds before aborting and calling failure handler.
         * @attribute dataTimeout
         * @type Number
         * @default null
         */
        this.setAttributeConfig('dataTimeout', {
            value: attr.dataTimeout || null,
            validator: YAHOO.lang.isNumber
        });
        
        /**
         * Whether or not the tab is currently active.
         * If a dataSrc is set for the tab, the content will be loaded from
         * the given source.
         * @attribute active
         * @type Boolean
         */
        this.setAttributeConfig('active', {
            value: attr.active || this.hasClass(this.ACTIVE_CLASSNAME),
            method: function(value) {
                if (value === true) {
                    this.addClass(this.ACTIVE_CLASSNAME);
                    this.set('title', 'active');
                } else {
                    this.removeClass(this.ACTIVE_CLASSNAME);
                    this.set('title', '');
                }
            },
            validator: function(value) {
                return YAHOO.lang.isBoolean(value) && !this.get('disabled') ;
            }
        });
        
        /**
         * Whether or not the tab is disabled.
         * @attribute disabled
         * @type Boolean
         */
        this.setAttributeConfig('disabled', {
            value: attr.disabled || this.hasClass(this.DISABLED_CLASSNAME),
            method: function(value) {
                if (value === true) {
                    Dom.addClass(this.get('element'), this.DISABLED_CLASSNAME);
                } else {
                    Dom.removeClass(this.get('element'), this.DISABLED_CLASSNAME);
                }
            },
            validator: YAHOO.lang.isBoolean
        });
        
        /**
         * The href of the tab's anchor element.
         * @attribute href
         * @type String
         * @default '#'
         */
        this.setAttributeConfig('href', {
            value: attr.href ||
                    this.getElementsByTagName('a')[0].getAttribute('href', 2) || '#',
            method: function(value) {
                this.getElementsByTagName('a')[0].href = value;
            },
            validator: YAHOO.lang.isString
        });
        
        /**
         * The Whether or not the tab's content is visible.
         * @attribute contentVisible
         * @type Boolean
         * @default false
         */
        this.setAttributeConfig('contentVisible', {
            value: attr.contentVisible,
            method: function(value) {
                if (value) {
                    this.get('contentEl').style.display = 'block';
                    
                    if ( this.get('dataSrc') ) {
                     // load dynamic content unless already loading or loaded and caching
                        if ( !this._loading && !(this.get('dataLoaded') && this.get('cacheData')) ) {
                            _dataConnect.call(this);
                        }
                    }
                } else {
                    this.get('contentEl').style.display = 'none';
                }
            },
            validator: YAHOO.lang.isBoolean
        });
    };
    
    var _createTabElement = function(attr) {
        var el = document.createElement('li');
        var a = document.createElement('a');
        
        a.href = attr.href || '#';
        
        el.appendChild(a);
        
        var label = attr.label || null;
        var labelEl = attr.labelEl || null;
        
        if (labelEl) { // user supplied labelEl
            if (!label) { // user supplied label
                label = _getLabel.call(this, labelEl);
            }
        } else {
            labelEl = _createlabelEl.call(this);
        }
        
        a.appendChild(labelEl);
        
        return el;
    };
    
    var _getlabelEl = function() {
        return this.getElementsByTagName(this.LABEL_TAGNAME)[0];
    };
    
    var _createlabelEl = function() {
        var el = document.createElement(this.LABEL_TAGNAME);
        return el;
    };
    
    var _setLabel = function(label) {
        var el = this.get('labelEl');
        el.innerHTML = label;
    };
    
    var _getLabel = function() {
        var label,
            el = this.get('labelEl');
            
            if (!el) {
                return undefined;
            }
        
        return el.innerHTML;
    };
    
    var _dataConnect = function() {
        if (!YAHOO.util.Connect) {
            return false;
        }

        Dom.addClass(this.get('contentEl').parentNode, this.LOADING_CLASSNAME);
        this._loading = true; 
        var dst = this.get('contentEl');
        var oref = this;
        oref.set('content','<img src="http://app.moviemates.de/OpenSocial/img/wait.gif" alt="Bitte warten ..." />');
        osmm_icb(this.get('dataSrc'),null,function(o){
	        var dat = o;
	        var k1 = dat.indexOf("/* <![CDATA[ */");
	        var k2 = dat.indexOf("/* ]]> */",k1);
	        var e = '';
	        if(k1!=-1 && k2!=-1 && k1<k2){
	          e = dat.substring(k1+15,k2);
	          dat = dat.substring(0,k1)+dat.substring(k2+9);
	        }
	        oref.set('content', dat);
	        try{eval(e);}catch(e){}
	        //
          oref.set('dataLoaded', true);
          oref.dataConnection = null;
          Dom.removeClass(oref.get('contentEl').parentNode,
                  oref.LOADING_CLASSNAME);
          oref._loading = false;
          try{_IG_AdjustIFrameHeight();}catch(e){}
        });
    };
    
    YAHOO.widget.Tab2 = Tab2;
})();


// STOP YAHOO
function osmm_request() {
  try{_IG_Analytics("UA-1779476-4", "/mmgadget");}catch(e){}
  try{
  var arg = osmm_getArgs();
  var req = opensocial.newDataRequest();
  req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
  req.add(req.newFetchPersonRequest("OWNER"), "owner");
  req.add(req.newFetchPeopleRequest("VIEWER_FRIENDS"), "viewerFriends");
  req.add(req.newFetchPeopleRequest("OWNER_FRIENDS"), "ownerFriends");
  req.send(osmm_response);
  }catch(e){
    var arg = osmm_getArgs();
    if(osmm_lt==true){
	    var par = 'href='+window.location.href;
	    var par = 'href='+window.location.search;
	    var par = 'synd=hi5&mode=profile&owner=113295942|Siegmund|http://sandbox.hi5.com/friend/profile/displayProfile.do?userid=113295942|http://photos1.hi5.com/0013/997/012/Q9qJN8997012-01.jpg'
	    +'&viewer=113295942|Siegmund|http://sandbox.hi5.com/friend/profile/displayProfile.do?userid=113295942|http://photos1.hi5.com/0013/997/012/Q9qJN8997012-01.jpg';
	    osmm_gp = par;
	    osmm_icb('',document.getElementById('main'));
    }else{
	    alert('ERROR-1\n'+e);
    }
  }
}
function osmm_response(data) {
try{
  var par='';
  //par=par+'&href='+window.location.href;
  //par=par+'&vf=';
  //par=par+'&of=';
  var arg = osmm_getArgs();
  var viewer = data.get("viewer").getData();
  var owner = data.get("owner").getData();
  var viewerFriends = null;
  var ownerFriends = null;
  if(data.get("viewerFriends"))
    viewerFriends = data.get("viewerFriends").getData();
  var ownerFriends = null;
  if(data.get("ownerFriends"))
    ownerFriends = data.get("ownerFriends").getData();
  // construct application parameter
  if(viewer){
    par=par+'viewer='+viewer.getId()+'|'+viewer.getDisplayName()+'|'
   +viewer.getField(opensocial.Person.Field.PROFILE_URL)+'|'
   +viewer.getField(opensocial.Person.Field.THUMBNAIL_URL);
  }else{
    par=par+'';
  }
  if(owner){
   par=par+'&owner='+owner.getId()+'|'+owner.getDisplayName()+'|'
   +owner.getField(opensocial.Person.Field.PROFILE_URL)+'|'
   +owner.getField(opensocial.Person.Field.THUMBNAIL_URL);
  }
  if(arg['synd'])
  par=par+'&synd='+arg['synd'];
  if(arg['mode'])
  par=par+'&mode='+arg['mode'];
  if(arg['origin'])
  par=par+'&origin='+arg['origin'];
  osmm_gp = par;
  var fp='';
  if(ownerFriends){
    try{
      ownerFriends.each(function(p) {
        fp=p.getId()+'|'+p.getDisplayName()+'|'+p.getField(opensocial.Person.Field.PROFILE_URL)
        +'|'+p.getField(opensocial.Person.Field.THUMBNAIL_URL)+'|';
        osmm_icb('cmd=sgraph&of='+fp,null);
      });   
    }catch(e){
      //alert('ERROR OF\n'+e);
    }
  }
  if(viewerFriends){
    try{
      viewerFriends.each(function(p) {
        fp=p.getId()+'|'+p.getDisplayName()+'|'+p.getField(opensocial.Person.Field.PROFILE_URL)
        +'|'+p.getField(opensocial.Person.Field.THUMBNAIL_URL)+'|';
        osmm_icb('cmd=sgraph&vf='+fp,null);
      });   
    }catch(e){
      //alert('ERROR VF\n'+e);
    }
  }
  osmm_icb('',document.getElementById('main'));
}catch(e){
  alert('INNER ERROR\n'+e);  
} 
}
function osmm_icb(par,dst,fct){
  try{
    if(osmm_lt==true){
    var transaction = YAHOO.util.Connect.asyncRequest('GET', 
      'http://localhost:8080/OpenSocial/container?'+encodeURI(osmm_gp+'&'+par), (fct ? fct : 
      {success:function(o){
        var dat = o.responseText;
		    var k1 = dat.indexOf("/* <![CDATA[ */");
		    var k2 = dat.indexOf("/* ]]> */",k1);
		    var e = '';
		    if(k1!=-1 && k2!=-1 && k1<k2){
		      e = dat.substring(k1+15,k2);
		      dat = dat.substring(0,k1)+dat.substring(k2+9);
		    }
        if(dst) 
        dst.innerHTML = dat;
        try{eval(e);}catch(e){}
      }, failure:function(o){
        alert('FEHLER ICB '+o.status);} 
        })  );
    }else{
      _IG_FetchContent('http://app.moviemates.de/OpenSocial/container?'+encodeURI(osmm_gp+'&'+par),
     (fct ? fct : 
      function (o){
        var dat = o;
        var k1 = dat.indexOf("/* <![CDATA[ */");
        var k2 = dat.indexOf("/* ]]> */",k1);
        var e = '';
        if(k1!=-1 && k2!=-1 && k1<k2){
          e = dat.substring(k1+15,k2);
          dat = dat.substring(0,k1)+dat.substring(k2+9);
        }
        if(dst) 
        dst.innerHTML = dat;
        try{eval(e);}catch(e){}
        try{_IG_AdjustIFrameHeight();}catch(e){}
      }),
      {refreshInterval:0});
    } 
	}catch(e){
	  alert('INNER ERROR2\n'+e);  
	} 
}
function osmm_search(f,sp){
  try{
    var dst = osmm_getParentType(f,1,'DIV');
    if(f.q.value==''){
      alert('Bitte einen Suchbegriff eingeben.');
      return false;
    }
    sp=sp+'&q='+f.q.value;
    osmm_icb(sp,dst);
  }catch(e){ alert('Error in search\n'+e); }
  return false;
}
function osmm_getParentType(node,lvl,nn){
  var i=0;
  var j=0;
  var line = null;
  for(i=0;i<10;i++){
    if(node.nodeType==1 && node.nodeName==nn){
      j++;
      if(j==lvl){
        line = node;
        break;
      }
    }
    node = node.parentNode;
  }
  return line;
}
function getNextSibling(node,nn){
  var i=0;
  var line = null;
  for(i=0;i<10 && node;i++){
    node = node.nextSibling;
    if(node && node.nodeType==1 && ((nn!=null && node.nodeName==nn)||(nn==null))){
      line = node;
      break;
    }
  }
  return line;
}
function osmm_getPreviousSibling(node,nn){
  var i=0;
  var line = null;
  if(!nn){
    nn = node.nodeName;
  }
  for(i=0;i<10 && node;i++){
    node = node.previousSibling;
    if(node && node.nodeType==1 && node.nodeName==nn){
      line = node;
      break;
    }
  }
  return line;
}
function osmm_go(f,pars){
  try{
    var dst = osmm_getParentType(f,1,'DIV');
    osmm_icb(pars,dst);
  }catch(e){ alert('Error in go\n'+e); }
  return false;
}
function osmm_gom(f,filmId){
  return osmm_go(f,'vs=homem&filmid='+filmId);
}
function osmm_gop(f,personId){
  return osmm_go(f,'vs=homep&personid='+personId);
}
function osmm_srate(node,filmId,val,ext){
  try{
    osmm_icb('vs=rate&filmid='+filmId+'&val='+val,null);
    var j = node.src.lastIndexOf('/');
    var p = osmm_getParentType(node,1,'SPAN');
    var k=0;
    p.setAttribute("val",val);
    for(i=0;i<p.childNodes.length;i++){
      if(p.childNodes[i].nodeType==1 && p.childNodes[i].nodeName=='IMG'){
        node = p.childNodes[i];
        node.src = node.src.substr(0,j+1)+(k<val? 'own': 'avg0')+(k%2==0 ? '_li' : '_re')+'.gif';
        k++;
      }
    }  
    if(ext){
      var dp = osmm_getParentType(p,1,'DIV');
      for(i=0;i<dp.childNodes.length;i++){
        if(dp.childNodes[i].nodeType==1 && dp.childNodes[i].nodeName=='IMG'){
          node = dp.childNodes[i];
          j = node.src.lastIndexOf('/');
          var n = node.src.substr(j+1);
          if(n=='rate01.gif'){
            node.src=node.src.substr(0,j+1)+'rate00.gif';
          }else if(n=='rate11.gif'){
            node.src=node.src.substr(0,j+1)+'rate10.gif';
          }
        }
      }
    }
  }catch(e){
    alert('Fehler beim Rating '+e.message);
  }
}
function osmm_lrate(node){
  try{
    var j = node.src.lastIndexOf('/');
    var p = osmm_getParentType(node,1,'SPAN');
    if(p.getAttribute('val')){
      val=p.getAttribute('val');
    }
    var base = (val<0 ? 'avg' : 'own');
    var val = Math.abs(val);
    var k=0;
    for(i=0;i<p.childNodes.length;i++){
      if(p.childNodes[i].nodeType==1 && p.childNodes[i].nodeName=='IMG'){
        node = p.childNodes[i];
        node.src = node.src.substr(0,j+1)+(k<val? base: 'avg0')+(k%2==0 ? '_li' : '_re')+'.gif';
        k++;
      }
    }  
  }catch(e){
    alert('Fehler beim Rating '+e.message);
  }  
}
function osmm_erate(node){
  try{
    var p = osmm_getParentType(node,1,'SPAN');
    var j = node.src.lastIndexOf('/');
    var s = node;
    for(i=0;i<10 && node;i++){
      if(node && node.nodeType==1 && node.nodeName=='IMG'){
        node.src = node.src.substr(0,j+1)+'own'+node.src.substr(node.src.length-7,7);
        node = node.previousSibling;
      }else{
        break;
      }
    }
    node = s.nextSibling;
    for(i=0;i<10 && node;i++){
      if(node && node.nodeType==1 && node.nodeName=='IMG'){
        node.src = node.src.substr(0,j+1)+'avg0'+node.src.substr(node.src.length-7,7);
        node = node.nextSibling;
      }else{
        break;
      }
    }
  }catch(e){
    alert('Fehler beim Rating '+e.message);
  }  
}
function osmm_rrate(node,filmID){
  try{
    var j = node.src.lastIndexOf('/');
    var n = node.src.substr(j+1);
    var c = -1;
    if(n=='rate00.gif'){
      node.src=node.src.substr(0,j+1)+'rate01.gif';
      c=0;
    }else if(n=='rate01.gif'){
      node.src=node.src.substr(0,j+1)+'rate00.gif';
    }else if(n=='rate10.gif'){
      node.src=node.src.substr(0,j+1)+'rate11.gif';
      c=1;
    }else if(n=='rate11.gif'){
      node.src=node.src.substr(0,j+1)+'rate10.gif';
    }
    // Sterne zurücknehmen
    var dp = osmm_getParentType(node,1,'DIV');
    var val=0;
    for(i=0;i<dp.childNodes.length;i++){
      if(dp.childNodes[i].nodeType==1 && dp.childNodes[i].nodeName=='SPAN'){
        var p = dp.childNodes[i];
        var k=0;
        p.setAttribute("val",val);
        for(i=0;i<p.childNodes.length;i++){
          if(p.childNodes[i].nodeType==1 && p.childNodes[i].nodeName=='IMG'){
            n2 = p.childNodes[i];
            j = n2.src.lastIndexOf('/');
            n2.src = n2.src.substr(0,j+1)+(k<val? 'own': 'avg0')+(k%2==0 ? '_li' : '_re')+'.gif';
            k++;
          }
        }  
      }
    }
    // Andere Wahl zurücknehmen
    if(c==0 || c==1){
      var p = node.parentNode;
      for(i=0;i<p.childNodes.length;i++){
        if(p.childNodes[i].nodeType==1 && p.childNodes[i].nodeName=='IMG'){
          n2 = p.childNodes[i];
          j = n2.src.lastIndexOf('/');
          var n = n2.src.substr(j+1);
          if(c==0 && n=='rate11.gif'){
            n2.src = n2.src.substr(0,j+1)+'rate10.gif';
          }else if(c==1 && n=='rate01.gif'){
            n2.src = n2.src.substr(0,j+1)+'rate00.gif';
          }
        }
      }
    }
    // Speichern des Ergebnis (11=wanttoseit,12=ignoreit
    osmm_icb('vs=rate&filmid='+filmID+'&val='+(11+c),null);
  }catch(e){
    alert('Fehler '+e.message);
  }
}
function osmm_crating(node,filmID){
  try{
    var p = osmm_getPreviousSibling(node,'TEXTAREA');
    if(p){
	    var content = p.value;
	    osmm_icb('vs=rate&filmid='+filmID+'&cmt='+content,null);
    }
  }catch(e){
    alert('Fehler '+e.message);
  }
}
function osmm_listent(node,listId,filmId,option){
  try{
    osmm_icb('vs=flist&filmid='+filmId+'&listid='+listId+'&opt='+option,null);
    var p = node.parentNode;
    p.removeChild(node);
    var nt = document.createTextNode("zugefügt");
    p.appendChild(nt);
  }catch(e){
    alert('Fehler beim Rating '+e.message);
  }
}
function osmm_getArgs() { 
  try { 
    var q = window.location.search.substring(1); 
    var a = q.split("&"); 
    var args = {}; 
    for (var i=0;i<a.length;i++) { 
      if (a[i] && a[i].indexOf('=')){ 
        var arg = a[i].split('='); 
        args[arg[0]] = arg[1]; 
      } 
    } 
    return args; 
  } catch(err) { 
    return {}; 
  } 
}
function osmm_fan(node,personID){
  try{
    osmm_icb('vs=fanp&personid='+personID,node);
  }catch(e){
    alert('Fehler beim Speichern '+e.message);
  }
}

Page Rating

Rating: 3.2/5 (6 votes cast)

Personal tools
communication