function imgMouseRollOver(basePath, row, effect){
	if(effect==1){
		row.all.item(1).src = basePath+"btn_left_down.gif";
		row.all.item(2).style.backgroundImage = "url(" + basePath + "btn_tile_down.gif)";
		row.all.item(4).src = basePath+"btn_right_down.gif";
	}
	else{
		row.all.item(1).src = basePath+"btn_left.gif";
		row.all.item(2).style.backgroundImage = "url(" + basePath + "btn_tile.gif)";
		row.all.item(4).src = basePath+"btn_right.gif";
	}
}
 
function ChangeDiv1()
			{
			/*A1i.src='images/icon_Plus_1.gif';
			A2i.src='images/icon_Plus_1.gif';
			A3i.src='images/icon_Plus_1.gif';
			A4i.src='images/icon_Plus_1.gif';
			A1b.src='images/icons/icon_folder_close.gif';
			A2b.src='images/icons/icon_folder_close.gif';
			A3b.src='images/icons/icon_folder_close.gif';
			A4b.src='images/icons/icon_folder_close.gif';
			A1.className='off';
			A2.className='off';
			A3.className='off';
			A4.className='off';*/

}
function ChangeDiv2(Exp)
{

var obj = eval(Exp);
//var imgobj = eval(Exp+ "i");
//var imgobj2 = eval(Exp+ "b");
if(obj.className == 'off')
	{
	obj.className='on';
	selNo.className='off';
	}
	
else
	{
	obj.className='off';
	selNo.className='form-element';
	}
	
}
 
function change_profile()
{
	a=confirm('Are you sure you want to change the profile of selected user(s)?');
	if(a==true)
	{
		window.location.href='um_users_change_profile.htm';
	}
}
function change_password()
{
	if(document.all.change_password.checked==true)
	{
		tr1.className='on';
		tr2.className='on';
		tr3.className='on';
	}
	else
	{
		tr1.className='off';
		tr2.className='off';
		tr3.className='off';
	}
} 

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function showRow()
{
if(br01.className=='off')	{br01.className='on'}
else if(br02.className=='off')	{br02.className='on'}
else if(br03.className=='off')	{br03.className='on'}
}

function hideRow()
{
if(br03.className=='on')	{br03.className='off'}
else if(br02.className=='on')	{br02.className='off'}
else if(br01.className=='on')	{br01.className='off'}
}

function navigation()
{
if(document.all.uname.value=='admin')
{window.location.href='administrator/um_administrator.htm';}
else if(document.all.uname.value=='user')
{window.location.href='user/settings.htm';}
else
{alert("Please Type 'admin' for Administration Login OR 'user' for User Login");
//document.all.selService[0].selected=true;
}
}
function enableDis()
{
	if(disable.className=='off')
	{
	disable.className='on';enable.className='off';
	tr_im.disabled=true;
	document.all.txtname.value='George Glenn';
	}
	else
	{
	disable.className='off';enable.className='on';
	tr_im.disabled=false;
	document.all.txtname.value='George Glenn';
	}
}
function enableDisChild()
{
	if(disable.className=='off')
	{
	disable.className='on';enable.className='off';
	disable.parentNode.parentNode.parentNode.parentNode.parentNode.disabled=true;
	}
	else
	{
	disable.className='off';enable.className='on';
	disable.parentNode.parentNode.parentNode.parentNode.parentNode.disabled=false;
	}
}
function CheckAll1()
{
	if(a=0)
	{
		// var objMailTable = document.all("mainTable")
		var objColCheckBox = document.getElementsByTagName("INPUT");	
		for(var i=0;i<objColCheckBox.length;i++)
		{
			if(objColCheckBox(i).type == "checkbox")
			objColCheckBox(i).checked = prmValue;
		}	
	}
	else
	{
		// var objMailTable = document.all("mainTable")
		var objColCheckBox = document.getElementsByTagName("INPUT");	
		for(var i=0;i<objColCheckBox.length;i++)
		{
			if(objColCheckBox(i).type == "checkbox")
			objColCheckBox(i).checked = prmValue;
		}
	}
}
function deletrow01()
{
a11.className='off';
}
function saveRow()
{
	rowedit.className='off';
	rownonedit.className='compback3';	
}
function editRow()
{
	rowedit.className='compback3';
	rownonedit.className='off';	
}
function deleteRow()
{
confirm("Are you sure you want to delete?");	
}
function onRow()
{
	trRowHide.className='on';
}
function rowVisible()
{
	trrowVisible.className='on';
}
function chkChild()
{
	if(document.all.chkChild02.checked==false&&document.all.chkMain.checked==true)
	{
			document.all.chkMain.checked=false;
			document.all.chkChild02.checked=false;
	}
	else if(document.all.chkChild01.checked==true&&document.all.chkChild03.checked==true&&document.all.chkMain.checked==false)
	{
			document.all.chkMain.checked=true;
			document.all.chkChild02.checked=true;
	}
}
function chkMain()
{
	if(document.all.chkMain.checked==true)
	{
		document.all.chkChild01.checked=true;
		document.all.chkChild02.checked=true;
		document.all.chkChild03.checked=true;
	}
	else if(document.all.chkMain.checked==false)
	{
		document.all.chkChild01.checked=false;
		document.all.chkChild02.checked=false;
		document.all.chkChild03.checked=false;
	}
}
/***********************************************
* Gradual Highlight image script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var baseopacity=30

function slowhigh(which2){
imgobj=which2
browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
highlighting=setInterval("gradualfade(imgobj)",50)
}

function slowlow(which2){
cleartimer()
instantset(baseopacity)
}

function instantset(degree){
if (browserdetect=="mozilla")
imgobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
imgobj.filters.alpha.opacity=degree
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}
function ShowActionDiv(Exp, prmThis, topcorrection, leftcorrection)
{
	if(Exp.className == 'off')
	{		  
		document.all.selAction.className='off';
		var intOffSetTop = 0;
		var intOffSetLeft = 0;
		var objOffSetparent = prmThis;		
		
		while(objOffSetparent && objOffSetparent.tagName != "BODY")
		{
			intOffSetTop += objOffSetparent.offsetTop;
			intOffSetLeft += objOffSetparent.offsetLeft;
			objOffSetparent = objOffSetparent.offsetParent;
		}
		
		  Exp.className='on';
		  Exp.style.left = intOffSetLeft+leftcorrection; 
		  Exp.style.top =  intOffSetTop+topcorrection; 
	}
	else{
		  Exp.className='off';
		  document.all.selAction.className='on';
}
}

function ShowDivOver2(Exp, prmThis, topcorrection, leftcorrection)
{
	if(Exp.style.display == 'none')
	{
		var intOffSetTop = 0;
		var intOffSetLeft = 0;
		var objOffSetparent = prmThis;		
		
		while(objOffSetparent && objOffSetparent.tagName != "BODY")
		{
			intOffSetTop += objOffSetparent.offsetTop;
			intOffSetLeft += objOffSetparent.offsetLeft;
			objOffSetparent = objOffSetparent.offsetParent;
		}
		
		  Exp.className='on';
		  Exp.style.left = intOffSetLeft+leftcorrection; 
		  Exp.style.top =  intOffSetTop+topcorrection-10; 
	}
	else
		  Exp.style.display='';
}
function HideDivOver(Exp)
{
	if(Exp.className == 'off')
	{
		  Exp.className='on';
	}
	else	
	{
		  Exp.className='off';
	}
}
function ShowDivOver(Exp)
{
	if(Exp.className == 'off')
	{
		  Exp.className='on';
	}
	else	
	{
		  Exp.className='off';
	}
}
function ChangeBackGround(tdId)
{
	if(tdId.className == "nofocus")
	{
		tdId.className="focus";
		tdId.color="#FFFFFF";
	}
	else
		tdId.className="nofocus";
}
function paymentOption()
{
	if(document.all.selMode.value=='1')
	{
		trPayCheque.className='on';
		trPayDD.className='off';
		trPayCC.className='off';
	}
	else if(document.all.selMode.value=='2')
	{
		trPayCheque.className='off';
		trPayDD.className='on';
		trPayCC.className='off';
	}
	else if(document.all.selMode.value=='3')
	{
		trPayCheque.className='off';
		trPayDD.className='off';
		trPayCC.className='on';
	}
}
    function hideElement( elmID, overDiv )
    {
      if( ie )
      {
        for( i = 0; i < document.all.tags( elmID ).length; i++ )
        {
          obj = document.all.tags( elmID )[i];
          if( !obj || !obj.offsetParent )
          {
            continue;
          }

          // Find the element's offsetTop and offsetLeft relative to the BODY tag.
          objLeft   = obj.offsetLeft;
          objTop    = obj.offsetTop;
          objParent = obj.offsetParent;

          while( objParent.tagName.toUpperCase() != "BODY" )
          {
            objLeft  += objParent.offsetLeft;
            objTop   += objParent.offsetTop;
            objParent = objParent.offsetParent;
          }

          objHeight = obj.offsetHeight;
          objWidth = obj.offsetWidth;

          if(( overDiv.offsetLeft + overDiv.offsetWidth ) <= objLeft );
          else if(( overDiv.offsetTop + overDiv.offsetHeight ) <= objTop );
          else if( overDiv.offsetTop >= ( objTop + objHeight ));
          else if( overDiv.offsetLeft >= ( objLeft + objWidth ));
          else
          {
            obj.style.visibility = "hidden";
          }
        }
      }
    }
    function showElement( elmID )
    {
      if( ie )
      {
        for( i = 0; i < document.all.tags( elmID ).length; i++ )
        {
          obj = document.all.tags( elmID )[i];

          if( !obj || !obj.offsetParent )
          {
            continue;
          }

          obj.style.visibility = "";
        }
      }
    }
function changeAction()
{
if(document.all.myAction.value==0)
{
window.location.href='pd_bug_list_bug_view.htm';
}
else if(document.all.myAction.value==1)
{
window.location.href='pd_bug_list_bug_view_action_assign.htm';
}
else if(document.all.myAction.value==2)
{
window.location.href='pd_bug_list_bug_view_action_resolve.htm';
}
else if(document.all.myAction.value==3)
{
window.location.href='pd_bug_list_bug_view_action_close.htm';
}
else if(document.all.myAction.value==4)
{
window.location.href='pd_bug_list_bug_view_action_reopen.htm';
}
else if(document.all.myAction.value==5)
{
window.location.href='pd_bug_list_bug_view_action_delete.htm';
}

} 

function Change(xp_new)
	{
		var obj = eval(xp_new);
		var m1 = document.getElementById(xp_new+ "i");
		if(obj.className == 'off')
		{
			obj.className='on';
			m1.src='images/icon_min.gif';	
		}
		else
		{
			obj.className='off';
			m1.src='images/icon_Plus.gif';	
		}



	}
	
	
function showrowopt()
{
	if (document.form1.r1[0].checked == true){
		document.getElementById('choose').style.display = '';
		document.getElementById('bla').style.display = '';
	
	}
	
	
	if (document.form1.r1[1].checked == true){
		document.getElementById('choose').style.display = 'none';
		document.getElementById('bla').style.display = 'none';
	}
	
}

