// JavaScript Document
/*
  Script written by Deepak J. Ingwale
  Its a common function for ajax request
  with 2 parameters
  1. Page from where information retrieved and 
  2. Object id where information is to b poured.
  created on 30 July 2007 @ cssaglobal
*/

var xmlhttp = new createXMLObj();
var xmlhttp1 = new createXMLObj();
var whichvid ;
var whichscene ;
function viewfull(imgid)
{ 
   // alert(objid);
    //alert(imgid);
	whichvid = imgid;
    var fileurl = '../index.php?imageid='+imgid; //This is the path to the file we just finished making
	//alert(fileurl);
	window.location='index.php?imageid='+imgid;
	xmlhttp.open('GET', fileurl, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
    xmlhttp.onreadystatechange = handlehHttpReceivedata;
    xmlhttp.send(null); //Nullify the XMLHttpRequest
}

function handlehHttpReceivedata() 
{
	var elem1;
	//alert(xmlhttp.status)
	//alert(xmlhttp.responseText);
  if (xmlhttp.readyState == 4) 
  {  
    results = xmlhttp.responseText;//the fields are seperated by ##
	//if(results=='n')
	//alert("Not allow!");
    var elem1 = document.getElementById("deepstarrate"+whichvid);
	//elem1.style.width = parseInt(results) +"%";
  }
}




function createXMLObj()
{
  var xmlhttp1=false; //Clear our fetching variable
		try {
              xmlhttp1 = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } catch (e) {
                try {
                        xmlhttp1 = new
                        ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } catch (E) {
                xmlhttp1 = false;
                        }
        }
        if (!xmlhttp1 && typeof XMLHttpRequest!='undefined') {
                xmlhttp1 = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
	return 	xmlhttp1;
}

