var baseopacity=70;
var crtMenu=1;
 var iy = window.screen.availHeight*0.9;
 var ix = window.screen.availWidth*0.9;


function slowhigh(which2,id){
/*
imgobj=which2
browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity,which2)
highlighting=setInterval("gradualfade(imgobj)",50)
*/
if (id!=crtMenu)
{
	which2.style.color="#38884B";

}


}

function slowlow(which2,id){
/*
cleartimer()
instantset(baseopacity,which2)
*/
	if (id!=crtMenu)
	{
		which2.style.color="#3B4781";

	}

}

function slow_all()
{
	/*
	slowlow(document.getElementById("btn1"),1);
	slowlow(document.getElementById("btn2"),2);
	slowlow(document.getElementById("btn3"),3);
	slowlow(document.getElementById("btn4"),4);
  */
}







function instantset(degree,which2)
{
 browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
var imgobj=which2
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 menuClick(id)
{  
  try
  {
      switch(id)
      {
        case 1 :  window.open("project.html", "mainf"); break;
        case 2 :  window.open("apartamente.html", "mainf"); break;
        case 3 :  window.open("finance.html", "mainf"); break;
        case 4 :  window.open("contact.html", "mainf"); break;
        case 5 :  window.open("cariere.php", "mainf"); break;
       }

			 crtMenu=id;
			 
			 document.getElementById("btn1").style.color="#3B4781";
			 document.getElementById("btn2").style.color="#3B4781";
			 document.getElementById("btn3").style.color="#3B4781";
			 document.getElementById("btn4").style.color="#3B4781";
			 document.getElementById("btn5").style.color="#3B4781";
			 
			 document.getElementById("btn"+id).style.color="#BC4955";
    }
    catch(er){alert(er.description) }

}

function selfloor(i)
{
    document.getElementById("bl1").src="img/bl1_"+i+".jpg";

}
function unselfloor(i)
{
     document.getElementById("bl1").src="img/bl1.jpg";

}
function selapt(obj)
{
    try
    {
        var id1=obj.id;
        document.getElementById("td0_"+id1).style.backgroundColor="#EB797D";
       
        document.getElementById("td1_"+id1).style.backgroundColor="#EB797D";
       
        document.getElementById("td2_"+id1).style.backgroundColor="#EB797D";
        
        document.getElementById("td3_"+id1).style.backgroundColor="#EB797D";
       
        document.getElementById("td4_"+id1).style.backgroundColor="#EB797D";
       
        document.getElementById("td5_"+id1).style.backgroundColor="#EB797D";
      
    
    }
    catch(e) 
    {
    //alert(id1) 
    }
}   

function selapt2(obj)
{
    try
    {
        var id1=obj.id;
        id2=id1.substring(4);
        document.getElementById("td0_"+id2).style.backgroundColor="#EB797D";
       
        document.getElementById("td1_"+id2).style.backgroundColor="#EB797D";
       
        document.getElementById("td2_"+id2).style.backgroundColor="#EB797D";
        
        document.getElementById("td3_"+id2).style.backgroundColor="#EB797D";
       
        document.getElementById("td4_"+id2).style.backgroundColor="#EB797D";
       
        document.getElementById("td5_"+id2).style.backgroundColor="#EB797D";
       
    
    }
    catch(e) 
    {
    //alert(id1) 
    }
}   


function unselapt(obj)
{
    try
    {
        var id1=obj.id;
        document.getElementById("td0_"+id1).style.backgroundColor="";
       
        document.getElementById("td1_"+id1).style.backgroundColor="";
       
        document.getElementById("td2_"+id1).style.backgroundColor="";
        
        document.getElementById("td3_"+id1).style.backgroundColor="";
        
        document.getElementById("td4_"+id1).style.backgroundColor="";
      
        document.getElementById("td5_"+id1).style.backgroundColor="";
       
    }
    catch(e) 
    {
    //alert(e.description) 
    }
}    

function unselapt2(obj)
{
    try
    {
        var id1=obj.id;
        id2=id1.substring(4);
        document.getElementById("td0_"+id2).style.backgroundColor="";
        
        document.getElementById("td1_"+id2).style.backgroundColor="";
       
        document.getElementById("td2_"+id2).style.backgroundColor="";
        
        document.getElementById("td3_"+id2).style.backgroundColor="";
      
        document.getElementById("td4_"+id2).style.backgroundColor="";
    
        document.getElementById("td5_"+id2).style.backgroundColor="";
       
       
    }
    catch(e) 
    {
    //alert(e.description) 
    }
}    
function ShowAptmap(crt)
{ 
    try
    {
   
		window.open("aptdetail.php?id="+crt,"_self");
     
    }
    catch(e) 
    {
    alert(e);
    }
}
/*function f1(){
setInterval("mdiv.filters.wave.phase+=10",100);
}

if (document.all){
document.write('<img id=mdiv src="'+document.all.reflect.src+'" style="filter:wave(strength=3,freq=3,phase=0,lightstrength=30)  blur() flipv()">')
window.onload=f1
}*/


function ShowApt(et)
{
	etNo=et;
	scNo="A";
	aptNo="01";
	crt="1";
	
	//iTop = (window.screen.availHeight)*0.88
	//iLeft = (window.screen.availWidth)*0.88
	iTop=700;
	iLeft=1000;
	
	try
	{			
		//window.showModalDialog("mainframe.php?et="+ etNo+"&crt="+crt ,aaa,"dialogWidth:"+ iLeft+"px;dialogHeight:"+iTop+"px;center:yes;status:no;")
		window.open("mainframe.php?et="+ etNo+"&crt="+crt,"","top=20,left=60,height="+iy + ",width="+ix)
	}
	catch(err)
	{
		//NON IE Browsers
		
		window.open("mainframe.php?et="+ etNo+"&crt="+crt,"","top=20,left=60,height="+iy + ",width="+ix)

	}
}	
