              var videoTabIds = ['tab_info', 'tab_comments', 'tab_share', 'tab_bookmarks', 'tab_rate', 'tab_infoextra', ];
                var activeVideoTabIndex = 0;
                var activeVideoTabLink = document.getElementById('tab0link');

                function switchToTab(link, index) {
                    var oldTab = document.getElementById(videoTabIds[activeVideoTabIndex]);
                    if (oldTab) {
                        oldTab.className = 'tab_inactive';
                    }
                    if (activeVideoTabLink) {
                        activeVideoTabLink.className = 'inactive';
                    }

                    var newTab = document.getElementById(videoTabIds[index]);
                    if (newTab) {
                        newTab.className = 'tab_active';
                    }
                    if (link) {
                        link.className = 'active';
                        link.blur();
                    }
                    activeVideoTabIndex = index;
                    activeVideoTabLink = link;
                }

				
function xmlhttpPost(strURL) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
	
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send(getquerystring());
}

function getquerystring() {
var form  = document.forms['rateform'];
var ID = form.ID.value;
var rate;
for (var i = 0; i < form.rate.length; i++) {   
   if(form.rate[i].checked){   rate = form.rate[i].value;    } 
   }
var qstr = 'ID=' + escape(ID) + ';rate=' +escape(rate);
   return qstr;
}

function updatepage(str){
    document.getElementById("result").innerHTML = str;
}
