function ajaxoption(args,ref)
{ 
	//alert("hai");
	var request = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
	request.open("POST", "option.php?"+ref, true);
	request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	request.onreadystatechange = function()
	{
		if (request.readyState == 4)
		{			
			var output = request.responseText;
			var arraysplit = output.split("::");
			var id = arraysplit[0];
			//alert("hai"+id);
			var desc = arraysplit[1];
			var title = arraysplit[2];
			var mins = arraysplit[3];
			var divid = "sing1";
			var divid1 = "des1";
			var divid2 = "tit1";
			var divid3 = "dur1";
			document.getElementById(divid).innerHTML = "<object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,18,0 width=400 height=350 id=test align=middle><param name=allowFullScreen value=true /><param name=movie value=images/playerID-1.swf?id="+id+"&ps=1 /><param name=uality value=high /><param name=bgcolor value=#000000 /><embed src=images/playerID-1.swf?id="+id+"&ps=1 quality=high bgcolor=#000000 width=400 height=350 name=test align=middle allowFullScreen=true type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer /></object>";
			document.getElementById(divid1).innerHTML = desc;
			document.getElementById(divid2).innerHTML = "<b>"+title+"</b>";
			document.getElementById(divid3).innerHTML = mins;
			window.location = "#S1";
		}
	};
	request.send(args);		
}
	


function set_background(id)
{
	//alert("hello"+id);
	hide_color();
	document.getElementById(id).style.background = "#E6E6FA";
}

function hide_color()
{
	for(i=1;i<=8;i++)
	{
		document.getElementById("v"+i).style.background = "#ffffff";
	}
}

function set_background1(id,nos)
{
	//alert("hello"+nos);
	hide_color()
	hide_color1(nos);
	document.getElementById(id).style.background = "#787878";
}

function hide_color1(nos)
{
	for(i=1;i<=nos;i++)
	{
		document.getElementById("s"+i).style.background = "#ffffff";
		
	}
}

function set_background_uniquely(id)
{
	//alert("hello"+id);
	hide_color_uniquely();
	document.getElementById(id).style.background = "#EFF3F9";
}

function hide_color_uniquely()
{
	for(i=1;i<=12;i++)
	{
		document.getElementById("U"+i).style.background = "#ffffff";
		
	}
}

