// JavaScript Document
//--------------
function popup(url)
{
	window.open(url,'','height=500 ,width=800, menubar=no,scrollbars=yes,resize=yes,top=10,left=150');
}
//---------------
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function addbookmark()
{
bookmarkurl="http://www.firstbpo.com/"
bookmarktitle="Market Research/Data Analysis"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function scrollit(seed) {
var m1  = "Welcome to FirstBPO Outsourcing Pvt. Ltd.!  ";
var m2  = "..... FirstBPO provides industry-leading business process outsourcing solutions to customers ";
var m3  = " worldwide using an offshore delivery platform ";
var m4  = "";
var msg=m1+m2+m3+m4;
var out = " ";
var c   = 1;
if (seed > 100) {
seed--;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 100 && seed > 0) {
for (c=0 ; c < seed ; c++) {
out+=" ";
}
out+=msg;
seed--;
window.status=out;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 0) {
if (-seed < msg.length) {
out+=msg.substring(-seed,msg.length);
seed--;
window.status=out;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else {
window.status=" ";
timerTwo=window.setTimeout("scrollit(100)",75);
      }
   }
}

//----------------------
function InitPage()
			{
			}
	
	function SelectLicense(n)
		{
			// save the license type.
			var cls;
		document.mainform.licenseType.value = n;
			document.mainform.submit();
		}
	
	function SetRowColor(theRow, newColor, newcls,thea)
	{
		var theCells = null; //new Array();
	
    // 1. Check that the browser can get the row
    if ( typeof(theRow.style) == 'undefined')
	{
        return false;
    }

	    // 2. Gets the current row and exits if the browser can't get it
		    if (typeof(document.getElementsByTagName) != 'undefined')
		{
        		theCells = theRow.getElementsByTagName('td');
    		}	
		    else if (typeof(theRow.cells) != 'undefined')
			{
	        theCells = theRow.cells;
    }	
    else
	{ 
        return false;
    }

    var rowCellsCnt  = theCells.length;
    var domDetect    = false;

//-------------------
if(navigator.appName=="Netscape")
cls="class";
else
cls="className";
//-------------------

    // 3.1 ... with DOM compatible browsers except Opera that does not return
    //         valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined' && typeof(theCells[0].getAttribute) != 'undefined')
	{
        domDetect    = true;
    }

    // 5. Sets the new color...
    var c = 0;
    // 5.1 ... with DOM compatible browsers except Opera
    if (domDetect == true)
	{
        for (c = 0; c < rowCellsCnt; c++)
		{
            theCells[c].setAttribute('bgcolor', newColor, 0);
			
			document.getElementById(thea).setAttribute(cls, newcls);					
			theCells[c].setAttribute(cls, newcls);

        } // end for
    }
    // 5.2 ... with other browsers
    else
	{
        for (c = 0; c < rowCellsCnt; c++) 
		{
            theCells[c].style.backgroundColor = newColor;
		
theCells[c].setAttribute(cls, 'normal', 0);
			
        }
    }
    return true;
}

//-----------------------------
function Show_Stuff(Click_Menu,hidmnu)
// Function that will swap the display/no display for
// all content within span tags
{
/*if (Click_Menu.style.display == "none")
{
Click_Menu.style.display = "";
hidmnu.style.display = "none";
}
else
{
Click_Menu.style.display = "none";
}*/
	
/*	var obj = document.getElementById(Click_Menu)
	var objHid = document.getElementById(hidmnu)
	if(obj.style.visibility=="hidden"){
			obj.style.visibility = "visible"
			objHid.style.visibility = "hidden"
	}
	else{
		obj.style.visibility = "hidden"
		objHid.style.visibility = "visible"
	}*/
	var obj=document.getElementById(Click_Menu)
	var objHid = document.getElementById(hidmnu)
	if(obj.style.display=="none"){
			obj.style.display = "";
			objHid.style.display = "none";
	}
	else{
			obj.style.display ="none"
			objHid.style.display = ""
	}
}


