
var check = window.parent.submit_url;

if(!check) {
	var url1 = document.URL;
} else {
	var url1 = window.parent.submit_url;
}
var url2;
if(Style=="Sleek" || Style=="sleek")
  url2 = 'http://www.bestofindya.com/news/cevb/urlsleek.php?url='+url1;
else if(Style == "HSleek" || Style == "hsleek")
{
  url2 = 'http://www.bestofindya.com/news/cevb/urlhsleek.php?url='+url1;
  if(typeof(link_summary) != "undefined")
  	url2 += "&summary=" + link_summary;
}
else if(Style == "Tiny" || Style == "tiny")
{
  url2 = 'http://www.bestofindya.com/news/cevb/urltiny.php?url='+url1;
  if(typeof(link_summary) != "undefined")
  	url2 += "&summary=" + link_summary;
}
else
  url2 = 'http://www.bestofindya.com/news/cevb/url.php?url='+url1;


var xmlhttp;

if (!xmlhttp && typeof XMLHttpRequest != 'undefined'){
	try {xmlhttp = new XMLHttpRequest ();}
	catch (e) {xmlhttp = false}
}

function myXMLHttpRequest(){
	var xmlhttplocal;
	try {xmlhttplocal = new ActiveXObject ("Msxml2.XMLHTTP")}
	catch (e) {
		try {xmlhttplocal = new ActiveXObject ("Microsoft.XMLHTTP")}
		catch (E) {xmlhttplocal = false;}
	}
	if (!xmlhttplocal && typeof XMLHttpRequest != 'undefined') {
		try {var xmlhttplocal = new XMLHttpRequest ();}
		catch (e) {var xmlhttplocal = false;}
	}
	return (xmlhttplocal);
}

var mnmxmlhttp = Array ();
var mnmString = Array ();
var mnmPrevColor = Array ();
var responsestring = Array ();
var myxmlhttp = Array ();
var responseString = new String;

function menealo(user,id,htmlid,md5,value){
  	if(xmlhttp) {
		url = "http://www.bestofindya.com/news/menealo.php";
		var mycontent = "id=" + id + "&user=" + user + "&md5=" + md5 + "&value=" + value;
		anonymous_vote = true;
        if (anonymous_vote == false && user == '0') {
            window.location="http://www.bestofindya.com/news/login.php?return="+location.href;
        } else {
    		mnmxmlhttp[htmlid] = new myXMLHttpRequest();
    		if (mnmxmlhttp) {
    			mnmxmlhttp[htmlid].open ("POST", url, true);
    			mnmxmlhttp[htmlid].setRequestHeader ('Content-Type','application/x-www-form-urlencoded');
    			mnmxmlhttp[htmlid].send (mycontent);
    			errormatch = new RegExp ("^ERROR:");
    			mnmxmlhttp[htmlid].onreadystatechange = function () {
    				if (mnmxmlhttp[htmlid].readyState == 4) {
    					mnmString[htmlid] = mnmxmlhttp[htmlid].responseText;
    				}
    			}
    		}
    	}
	}
}
if(Style == "Tiny" || Style == "tiny")
	document.write('<iframe width="11" height="11" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" src="'+url2+'"></iframe>');
if(Style == "HSleek" || Style == "hsleek")
	document.write('<iframe width="100" height="20" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" src="'+url2+'"></iframe>');
else
	document.write('<iframe width="35" height="46" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" src="'+url2+'"></iframe>');



