﻿function NullId(id)
{
document.getElementById(id).innerHTML = '';
}
function nameobj(id)
{
document.getElementById(id).innerHTML = 'Название '+document.formto.menuto.value+':';

}

//////////////////

var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2) {
(message);
return false;}}}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS;
}else{
document.onmouseup=clickNS;
document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false");

/*////////////////////
$j(document).ready(function(){
	    $j("#link_1").click(function(){
	        $j("#full_1all").slideToggle("slow");
	        
	    });
	});

/////////KOKO//////////*/
  

 
 /*
function RPL()
{
 $('ramka').style.left = (koko.image.getStyle('left').toInt()*(-1)/21.8)+610 + 'px';			 
$('ramka').style.top = (koko.image.getStyle('top').toInt()*(-1)/21.8)+4 +199+ 'px';

rxtor =koko.image.getStyle('left').toInt()*(-1);
rytor =koko.image.getStyle('top').toInt()*(-1);
}

function RPLthis(kx,ky)
{
 $('this').style.left = kx-(koko.image.getStyle('left').toInt()*(-1))+(-15)+'px';	///6.9		 
$('this').style.top = ky-(koko.image.getStyle('top').toInt()*(-1))+(-30)+'px';
}

*/

function tot(tox,toy)
{
	koko.loka(tox,toy);
	
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function obt(idi,idiid)
{		document.getElementById('oblvid').style.display = 'none';
		document.getElementById('oblvidid').style.backgroundColor = '#E8E8E8';
 		document.getElementById('oblvidobj').style.display = 'none';
 		document.getElementById('oblvidobjid').style.backgroundColor = '#E8E8E8';
		document.getElementById('oblvidfirm').style.display = 'none';
		document.getElementById('oblvidfirmid').style.backgroundColor = '#E8E8E8';		
	 	document.getElementById('oblvidstreet').style.display = 'none';
	 	document.getElementById('oblvidstreetid').style.backgroundColor = '#E8E8E8';	
	 	document.getElementById(idi).style.display = 'block';
	 	document.getElementById(idiid).style.backgroundColor = '#FFFFFF';
 	
}
//var xxl;
function doSearch() {
		document.getElementById('searchResultsDiv').innerText='';
					$j.ajax({
					type: "GET",
					url: "do_search.php?",
					data: "q=",
					success: function(html){
						$j("#searchResultsDiv").html(html);
				   }
				});
				
		//document.getElementById("searchResultsDiv").value="";
	//	document.find.searchResultsDiv.innerText='';		
		//return false;
}
 function createDiv(cx,cy)
    {
    //	if(cxcynum>1){return false;}
        var divTag = document.createElement("div"); 
       //  var cxob+cxcynum =cy;
       //  var cyob+cxcynum =cx;
        divTag.id = "dynamicDiv"+cxcynum;        
         divTag.className ="dynamicDiv"; 
          divTag.title=cx+","+cy;
         divTag.style.top = cy -(koko.image.getStyle('top').toInt()*(-1))-12 +'px';  
        divTag.style.left = cx -(koko.image.getStyle('left').toInt()*(-1)) +'px';               
        divTag.innerHTML = cxcynum;        
        document.getElementById('window').appendChild(divTag);        
        cxcynum++;
       // alert(divTag.title);
        //document.getElementById('window').removeChild(divTag.id);
    }
/*
function cxcy()
{
	var inc=1;
	if((document.getElementById('dynamicDiv').id=='dynamicDiv')&&(loady==1)){
	while(inc<cxcynum){			
		
document.getElementById('dynamicDiv'+inc).style.top = document.getElementById('dynamicDiv'+inc).title -(koko.image.getStyle('top').toInt()*(-1))-12 +'px';  
document.getElementById('dynamicDiv'+inc).style.left = document.getElementById('dynamicDiv'+inc).title -(koko.image.getStyle('left').toInt()*(-1)) +'px';

inc++;
	}
	}
}    
*/
