﻿// JScript File

function showhide(element)
    {
    	document.all(element).style.display = (document.all(element).style.display=="")?"none":"";
    }



function showframe(number)
    {

    	if (document.all('frmrow'+number).style.display =="none")
    	{
  //      alert(number);
    	    document.all('frame'+number).src="dett_service_mini.asp?ids="+number;
    	    document.all('frmimg'+number).src="img/minus.gif";
            document.all('frmrow'+number).style.display ="";
    	}
        else
        {
    	    document.all('frmimg'+number).src="img/plus.gif";
            document.all('frmrow'+number).style.display ="none";
        }

    }




function showhide2(element)
    {
    var ctl = document.getElementById(element);        
    var height = ctl.clientHeight;
    alert (height);        
    if (height>0)
    {
        for (i = 0; i < height; i++)
        {
            ctl.style.height=height-i;
            alert (height-i);        
            alert (ctl.style.height);        
//            sleep(500);    
        }
    
    }

    	document.all(element).style.display = (document.all(element).style.display=="")?"none":"";
    }



function showchild(IdControl,span1,span2)
{
    var ctl = document.getElementById(IdControl);        
    var ctl1 = document.getElementById(span1);        
    var ctl2 = document.getElementById(span2);        
    var str = ctl.value;
    var chd = str.substring(str.length-1,str.length);
        ctl1.style.display ="none";        
        ctl2.style.display ="none";        
    

    if (chd>0)
        ctl1.style.display ="";        
    if (chd>1)
        ctl2.style.display ="";        
}


function showmorerooms(ctl1,ctl2)
    {
    	document.all(ctl1).style.display = (document.all(ctl1).style.display=="")?"none":"";
    	document.all(ctl2).style.display = (document.all(ctl2).style.display=="")?"none":"";
    }


