// JavaScript Document
var xmlHttp
function showportfolio(str)
{
document.getElementById('port2').style.backgroundColor='#807d83';
//document.getElementById('after_close_' + split_id[j] ).style.backgroundColor='#807d83';
var portnumrows=document.getElementById('portnumrows').value;
var numrows=document.getElementById('numrows').value;

var split_id=numrows.split(",");
var split_id1=portnumrows.split(",")

for(var j=0;j<split_id1.length ;j++)
{
	if(split_id1[j]==str)
	{
		document.getElementById('port_' + split_id1[j] ).style.backgroundColor='#807d83';
	}
	else
	{
		document.getElementById('port_' + split_id1[j] ).style.backgroundColor='#b9bcb6';	
	}
}


for(var j=0;j<split_id.length ;j++)
{
	//if(split_id1[j]==str)
	//{
		//alert(1);
		//document.getElementById('port_' + split_id1[j] ).style.backgroundColor='#807d83';
	//}
	//else
	//{
		document.getElementById('div_name_' + split_id[j] ).style.backgroundColor='#b9bcb6';	
	//}
}

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
 alert ("Browser does not support HTTP Request")
 return
}
var url="portfolio.php"
url=url+"?pid="+str
url=url+"&amp;sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged1 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChanged1() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
		alert (2);
	    document.getElementById("right_outer").innerHTML = xmlHttp.responseText 
	 }
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
