var layerRef='null', styleSwitch='null';
if (navigator.appName == 'Netscape') {
	layerRef='document.layers';
	styleSwitch='';
}else{
	layerRef='document.all';
	styleSwitch='.style';
}
var leftRef = 'null', topRef = 'null';
if (navigator.appName == 'Netscape') {
 leftRef = '.left';
 topRef = '.top';
}else{
 leftRef = '.pixelLeft';
 topRef = '.pixelTop';
}

function clearform(){
document.getElementById("name").value="";
document.getElementById("email").value="";
document.getElementById("phone").value="";
document.getElementById("text").value="";
}

function bgOn(a){
	document.getElementById('td_'+a).className='on';
}
function bgOff(a){
	document.getElementById('td_'+a).className='off';
}
//прозрачная линия 
function LineOn(b){
	document.getElementById('line1_'+b).className='LineOn';
	document.getElementById('line2_'+b).className='LineOn';
	document.getElementById('line3_'+b).className='LineOn';
	document.getElementById('line4_'+b).className='LineOn';
	document.getElementById('line_'+b).className='LineOnA';
}
function LineOff(b){
	document.getElementById('line1_'+b).className='LineOff';
	document.getElementById('line2_'+b).className='LineOff';
	document.getElementById('line3_'+b).className='LineOff';
	document.getElementById('line4_'+b).className='LineOff';
	document.getElementById('line_'+b).className='LineOffA'
}
// виртуальный тур
function vtOn(bbb,bc){
	document.getElementById('vt_'+bbb).className='vtourOn';
	document.getElementById('circ_'+bc).style.display="block";
}
function vtOff(bbb,bc){
	document.getElementById('vt_'+bbb).className='vtourOff';
	document.getElementById('circ_'+bc).style.display="none";
}
function vtPOn(vt,vtp){
	document.getElementById('vtp_'+vt).className='vtourOn';
	document.getElementById('circP_'+vtp).style.display="block";
}
function vtPOff(vt,vtp){
	document.getElementById('vtp_'+vt).className='vtourOff';
	document.getElementById('circP_'+vtp).style.display="none";
}
function ImVt(im1,im2){
	document.getElementById('im_'+im1).style.display="block";
	document.getElementById('im_'+im2).style.display="none";
}
function prVtOn(cc){
	document.getElementById('pr1_'+cc).className='prOn';
	document.getElementById('pr2_'+cc).className='prOn';
}
function prVtOff(cc){
	document.getElementById('pr1_'+cc).className='prOff';
	document.getElementById('pr2_'+cc).className='prOff';
}

//проекты и цены
function proOn(pr,prT){
//alert(pr+" "+prT);
//alert(nn);
	document.getElementById('pr_'+pr).className='vtourOn';
	document.getElementById('prT_'+prT).style.display="block";
}
function proOff(pr,prT){
	document.getElementById('pr_'+pr).className='vtourOff';
	document.getElementById('prT_'+prT).style.display="none";
}
function ImPr(impr1,impr2){
	document.getElementById('im_'+impr1).style.display="block";
	document.getElementById('im_'+impr2).style.display="none";
}
function prOn(c){
	document.getElementById('pr1_'+c).className='prOn';
	document.getElementById('pr2_'+c).className='prOn';
}
function prOff(c){
	document.getElementById('pr1_'+c).className='prOff';
	document.getElementById('pr2_'+c).className='prOff';
}


// Общественные интерьеры
function obschOn(ob){
	document.getElementById('ob_'+ob).className='vtourOn';
}
function obschOff(ob){
	document.getElementById('ob_'+ob).className='vtourOff';
}
function prObOn(ob){
	document.getElementById('pr1_'+ob).className='prOn';
	document.getElementById('pr2_'+ob).className='prOn';
}
function prObOff(ob){
	document.getElementById('pr1_'+ob).className='prOff';
	document.getElementById('pr2_'+ob).className='prOff';
}
function ImOb(imob1,imob2){
	document.getElementById('im_'+imob1).style.display="block";
	document.getElementById('im_'+imob2).style.display="none";
}



///////////////
function MoveLayer(layerName,topstop){
	if (eval(layerRef+"['"+layerName+"']"+styleSwitch+topRef+" > topstop")){
	  MoveLayerTop(layerName,topstop);
	}
	if (eval(layerRef+"['"+layerName+"']"+styleSwitch+topRef+" < topstop")){
	 MoveLayerDown(layerName,topstop);
	}
}

function MoveLayerTop(layerName,topstop){ 
	if (eval(layerRef+"['"+layerName+"']"+styleSwitch+topRef+" > topstop")){
	currTop=eval(layerRef+"['"+layerName+"']"+styleSwitch+topRef+"-10");
	eval(layerRef+"['"+layerName+"']"+styleSwitch+topRef+" = currTop");
	setTimeout("MoveLayerTop('"+layerName+"',"+topstop+")",0);
	} 
	else {
		eval(layerRef+"['"+layerName+"']"+styleSwitch+".top = topstop");		
	}
}
function MoveLayerDown(layerName,topstop){ 
	if (eval(layerRef+"['"+layerName+"']"+styleSwitch+topRef+" < topstop")){
	currTop=eval(layerRef+"['"+layerName+"']"+styleSwitch+topRef+"+10");
	eval(layerRef+"['"+layerName+"']"+styleSwitch+topRef+" = currTop");
	setTimeout("MoveLayerDown('"+layerName+"',"+topstop+")",0);
	} 
	else {
		eval(layerRef+"['"+layerName+"']"+styleSwitch+".top = topstop");		
	}
}

var timerID = null;
var timerRunning = false;

function stopclock (){
        if(timerRunning)
                clearTimeout(timerID);
        timerRunning = false;
}
function showtime () {
        var now = new Date();
        var hours = now.getHours();
        var minutes = now.getMinutes();
		var date = now.getDate();
		var year = now.getFullYear();
		var month = now.getMonth() + 1;
        var seconds = now.getSeconds()
        var timeValue = ((hours >24) ? hours -24 :hours)
        timeValue += ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds
		var dayValue = date+"."+((month >12) ? month -12 :month)+"."+year;
        
        //timeValue += (hours >= 12) ? " Минск" : " Минск"
		document.getElementById('face').innerHTML=timeValue;
		document.getElementById('faceDate').innerHTML=dayValue;
        // you could replace the above with this
        // and have a clock on the status bar:
        //window.status = timeValue;
        timerID = setTimeout("showtime()",0);
        timerRunning = true;
}

function startclock () {
        // Make sure the clock is stopped
        stopclock();
        showtime();
}

function startclockIndex () {
        // Make sure the clock is stopped
        stopclock();
        showtime();
		document.getElementById('time').style.display="block";
}

function loadImg () {
        document.getElementById('img').style.display="block";
}
function loadImgTur () {
        document.getElementById('imgTur').style.display="block";
        document.getElementById('imgPlan').style.display="block";
}
function moveB(type, maxim){
    if(type=="opt"){
			last_im=document.getElementById('pr_9').src;
			//alert(last_im);
			li = last_im.split("/");
			num_l=li[li.length-1].split(".");
			last = num_l[0].replace("_", "");
			if(parseInt(last)==9){
			   //alert("d");
			   return false;
			}
			if(parseInt(last)>9){			   
			    for(i=1; i<10; i++){
				    last=parseInt(last);
					document.getElementById('pr_'+i).src="/templates/art-triumph/images/project/opt/"+(last-10+i)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/project/opt/"+(last-10+i)+".jpg','','width=693; height=500;scrollbars=yes');void(0);";				
				}
				for(i=1; i<10; i++){	
					last=parseInt(last);
					document.getElementById('pr_'+i.toString()).onmouseover=function(){proOn( parseInt(this.id.replace("pr_", "")),(last-10+parseInt(this.id.replace("pr_", ""))) )}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('pr_'+i.toString()).onmouseout=function(){proOff(parseInt(this.id.replace("pr_", "")), (last-10+parseInt(this.id.replace("pr_", ""))) );};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}
	}
	
    if(type=="03_stand"){
			last_im=document.getElementById('ob_39').src;
			li = last_im.split("/");
			num_l=li[li.length-1].split(".");
			last = num_l[0].replace("_", "");
			if(parseInt(last)==9){			   
			   return false;
			}
			if(parseInt(last)>9){			   
			    for(i=31; i<40; i++){
				    last=parseInt(last);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/obsch/03_stand/"+(last-10+i-30)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/obsch/03_stand/"+(last-10+i-30)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";				
				}
				for(i=31; i<40; i++){								
					nn=eval(last+i);
				  document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")) )}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
				  document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff(parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")));};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};										
				}
			}
          //alert(num_l[0]);

	}
    if(type=="04_stol"){
			last_im=document.getElementById('ob_59').src;
			//alert(last_im);
			li = last_im.split("/");
			num_l=li[li.length-1].split(".");
			last = num_l[0].replace("_", "");
			if(parseInt(last)==9){
			   //alert("d");
			   return false;
			}
			if(parseInt(last)>9){			   
			    for(i=51; i<60; i++){
				    last=parseInt(last);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/obsch/04_stol/"+(last-10+i-50)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/obsch/04_stol/"+(last-10+i-50)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";
				
				}
				for(i=51; i<60; i++){								
					nn=eval(last+i);
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")) )}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff(parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")));};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}
	}
    if(type=="05_ban"){
			last_im=document.getElementById('ob_79').src;			
			li = last_im.split("/");
			num_l=li[li.length-1].split(".");
			last = num_l[0].replace("_", "");
			if(parseInt(last)==9){			   
			   return false;
			}
			if(parseInt(last)>9){			   
			    for(i=71; i<80; i++){
				    last=parseInt(last);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/obsch/05_ban/"+(last-10+i-70)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/obsch/05_ban/"+(last-10+i-70)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";				
				}
				for(i=71; i<80; i++){								
					nn=eval(last+i);						
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOff( parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")) )}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff(parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")));};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}         
	}
    if(type=="06_ofis"){
			last_im=document.getElementById('ob_99').src;			
			li = last_im.split("/");
			num_l=li[li.length-1].split(".");
			last = num_l[0].replace("_", "");
			if(parseInt(last)==9){			   
			   return false;
			}
			if(parseInt(last)>9){			   
			    for(i=91; i<100; i++){
				    last=parseInt(last);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/obsch/06_ofis/"+(last-10+i-90)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/obsch/06_ofis/"+(last-10+i-90)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";				
				}
				for(i=91; i<100; i++){								
					nn=eval(last+i);
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")) )}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff(parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")));};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}         
	}
    if(type=="08_mag"){
			last_im=document.getElementById('ob_139').src;
			li = last_im.split("/");
			num_l=li[li.length-1].split(".");
			last = num_l[0].replace("_", "");
			if(parseInt(last)==9){
			 return false;
			}
			if(parseInt(last)>9){			   
			    for(i=131; i<140; i++){
				    last=parseInt(last);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/obsch/08_mag/"+(last-10+i-130)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/obsch/08_mag/"+(last-10+i-130)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";				
				}
				for(i=131; i<140; i++){								
					nn=eval(last+i);						
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")) )}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff(parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")));};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}
	}
    if(type=="12_fasad"){
			last_im=document.getElementById('ob_189').src;
			//alert(last_im);
			li = last_im.split("/");
			num_l=li[li.length-1].split(".");
			last = num_l[0].replace("_", "");
			if(parseInt(last)==9){
			   //alert("d");
			   return false;
			}
			if(parseInt(last)>9){			   
			    for(i=181; i<190; i++){
				    last=parseInt(last);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/obsch/12_fasad/"+(last-10+i-180)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/obsch/12_fasad/"+(last-10+i-180)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";				
				}
				for(i=181; i<190; i++){								
					nn=eval(last+i);
						document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")) )}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
						document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff(parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")));};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}
	}
    if(type=="kv4"){
			last_im=document.getElementById('ob_59').src;
			//alert(last_im);
			li = last_im.split("/");
			num_l=li[li.length-1].split(".");
			last = num_l[0].replace("_", "");
			if(parseInt(last)==9){
			   return false;
			}
			if(parseInt(last)>9){			   
			    for(i=51; i<60; i++){
				    last=parseInt(last);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/privat/kv4/"+(last-10+i-50)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/privat/kv4/"+(last-10+i-50)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";				
				}
				for(i=51; i<60; i++){								
					nn=eval(last+i);											
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")) )}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff(parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")));};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};															
				}
			}
	}
    if(type=="kv5"){
			last_im=document.getElementById('ob_79').src;
			//alert(last_im);
			li = last_im.split("/");
			num_l=li[li.length-1].split(".");
			last = num_l[0].replace("_", "");
			if(parseInt(last)==9){			  
			   return false;
			}
			if(parseInt(last)>9){			   
			    for(i=71; i<80; i++){
				    last=parseInt(last);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/privat/kv5/"+(last-10+i-70)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/privat/kv5/"+(last-10+i-70)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";				
				}
				for(i=71; i<80; i++){								
					nn=eval(last+i);
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")) )}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff(parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")));};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}
	}
    if(type=="kv6"){
			last_im=document.getElementById('ob_99').src;
			//alert(last_im);
			li = last_im.split("/");
			num_l=li[li.length-1].split(".");
			last = num_l[0].replace("_", "");
			if(parseInt(last)==9){			   
			   return false;
			}
			if(parseInt(last)>9){			   
			    for(i=91; i<100; i++){
				    last=parseInt(last);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/privat/kv6/"+(last-10+i-90)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/privat/kv6/"+(last-10+i-90)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";				
				}
				for(i=91; i<100; i++){								
					nn=eval(last+i);
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")) )}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff(parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")));};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}
	}
    if(type=="kv7"){
			last_im=document.getElementById('ob_119').src;
			li = last_im.split("/");
			num_l=li[li.length-1].split(".");
			last = num_l[0].replace("_", "");
			if(parseInt(last)==9){
			   return false;
			}
			if(parseInt(last)>9){			   
			    for(i=111; i<120; i++){
				    last=parseInt(last);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/privat/kv7/"+(last-10+i-110)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/privat/kv7/"+(last-10+i-110)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";				
				}
				for(i=111; i<120; i++){								
					nn=eval(last+i);						
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")) )}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff(parseInt(this.id.replace("ob_", "")), nn-parseInt(this.id.replace("ob_", "")));};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}   
	}
    if(type=="eks"){
			last_im=document.getElementById('pr_209').src;
			li = last_im.split("/");
			num_l=li[li.length-1].split(".");
			last = num_l[0].replace("_", "");
			if(parseInt(last)==9){
			   //alert("d");
			   return false;
			}
			if(parseInt(last)>9){			   
			    for(i=201; i<210; i++){
				    last=parseInt(last);
					document.getElementById('pr_'+i).src="/templates/art-triumph/images/project/eks/"+(last-10+i-200)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/project/eks/"+(last-10+i-200)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";				
				}
				for(i=201; i<210; i++){								
					nn=eval(last+i);
					//alert(last);
					document.getElementById('pr_'+i.toString()).onmouseover=function(){proOn(parseInt(this.id.replace("pr_", "")), last+parseInt(this.id.replace("pr_", ""))-10);}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('pr_'+i.toString()).onmouseout=function(){proOff(parseInt(this.id.replace("pr_", "")), last+parseInt(this.id.replace("pr_", ""))-10);}//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}
	}
}

function moveF(type, maxim){
    if(type=="opt"){
			first_im=document.getElementById('pr_1').src;			
			fi = first_im.split("/");
			num_f=fi[fi.length-1].split(".");			
            first = num_f[0].replace("_", "");
			if(parseInt(first)==(maxim-8)){
			    return false;
			}
			if(parseInt(first) < (maxim-8)){			   
			    for(i=1; i<10; i++){
				    first=parseInt(first);
					document.getElementById('pr_'+i).src="/templates/art-triumph/images/project/opt/"+(first+i)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/project/opt/"+(first+i)+".jpg','','width=693; height=500;scrollbars=yes');void(0);";					
				}	
				for(i=1; i<10; i++){								
					nn=eval(first+i);					
					
					document.getElementById('pr_'+i.toString()).onmouseover=function(){proOn( parseInt(this.id.replace("pr_", "")) , parseInt(this.id.replace("pr_", ""))+nn-9 );}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('pr_'+i.toString()).onmouseout=function(){proOff( parseInt(this.id.replace("pr_", "")), parseInt(this.id.replace("pr_", ""))+nn-9 );};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
					
				}
			}

	}
	
	
    if(type=="03_stand"){
			first_im=document.getElementById('ob_31').src;			
			fi = first_im.split("/");
			num_f=fi[fi.length-1].split(".");			
            first = num_f[0].replace("_", "");
			if(parseInt(first)==(maxim-8)){
			    return false;
			}
			if(parseInt(first) < (maxim-8)){			   
			    for(i=31; i<40; i++){
				    first=parseInt(first);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/obsch/03_stand/"+(first+i-30)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/obsch/03_stand/"+(first+i-30)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";					
				}	
				for(i=31; i<40; i++){								
					nn=eval(first+i);
					document.getElementById('ob_'+i.toString() ).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")) , parseInt(this.id.replace("ob_", ""))+nn-9 );}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff( parseInt(this.id.replace("ob_", "")), parseInt(this.id.replace("ob_", ""))+nn-9 );};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};									
				}
			}

	}
    if(type=="04_stol"){
			first_im=document.getElementById('ob_51').src;
			fi = first_im.split("/");
			num_f=fi[fi.length-1].split(".");			
            first = num_f[0].replace("_", "");
			if(parseInt(first)==(maxim-8)){
			    return false;
			}
			if(parseInt(first) < (maxim-8)){			   
			    for(i=51; i<60; i++){
				    first=parseInt(first);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/obsch/04_stol/"+(first+i-50)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/obsch/04_stol/"+(first+i-50)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";					
				}	
				for(i=51; i<60; i++){								
					nn=eval(first+i);
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")) , parseInt(this.id.replace("ob_", ""))+nn-9 );}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff( parseInt(this.id.replace("ob_", "")), parseInt(this.id.replace("ob_", ""))+nn-9 );};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}

	}
    if(type=="05_ban"){
			first_im=document.getElementById('ob_71').src;
			fi = first_im.split("/");
			num_f=fi[fi.length-1].split(".");			
            first = num_f[0].replace("_", "");
			if(parseInt(first)==(maxim-8)){
			    return false;
			}
			if(parseInt(first) < (maxim-8)){			   
			    for(i=71; i<80; i++){
				    first=parseInt(first);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/obsch/05_ban/"+(first+i-70)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/obsch/05_ban/"+(first+i-70)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";					
				}	
				for(i=71; i<80; i++){								
					nn=eval(first+i);
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")) , parseInt(this.id.replace("ob_", ""))+nn-9 );}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff( parseInt(this.id.replace("ob_", "")), parseInt(this.id.replace("ob_", ""))+nn-9 );};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}

	}
    if(type=="06_ofis"){
			first_im=document.getElementById('ob_91').src;			
			fi = first_im.split("/");
			num_f=fi[fi.length-1].split(".");			
            first = num_f[0].replace("_", "");
			if(parseInt(first)==(maxim-8)){
			   return false;
			}
			if(parseInt(first) < (maxim-8)){			   
			    for(i=91; i<100; i++){
				    first=parseInt(first);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/obsch/06_ofis/"+(first+i-90)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/obsch/06_ofis/"+(first+i-90)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";					
				}	
				for(i=91; i<100; i++){								
					nn=eval(first+i);
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")) , parseInt(this.id.replace("ob_", ""))+nn-9 );}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff( parseInt(this.id.replace("ob_", "")), parseInt(this.id.replace("ob_", ""))+nn-9 );};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}

	}
    if(type=="08_mag"){
			first_im=document.getElementById('ob_131').src;
			fi = first_im.split("/");
			num_f=fi[fi.length-1].split(".");			
            first = num_f[0].replace("_", "");
			if(parseInt(first)==(maxim-8)){
			   return false;
			}
			if(parseInt(first) < (maxim-8)){			   
			    for(i=131; i<140; i++){
				    first=parseInt(first);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/obsch/08_mag/"+(first+i-130)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/obsch/08_mag/"+(first+i-130)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";					
				}	
				for(i=131; i<140; i++){								
					nn=eval(first+i);
					//alert(nn);
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")) , parseInt(this.id.replace("ob_", ""))+nn-9 );}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff( parseInt(this.id.replace("ob_", "")), parseInt(this.id.replace("ob_", ""))+nn-9 );};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}

	}
    if(type=="12_fasad"){
			first_im=document.getElementById('ob_181').src;
			//alert(last_im);
			fi = first_im.split("/");
			num_f=fi[fi.length-1].split(".");			
            first = num_f[0].replace("_", "");
			if(parseInt(first)==(maxim-8)){
			 // alert("d");
			   return false;
			}
			if(parseInt(first) < (maxim-8)){			   
			    for(i=181; i<190; i++){
				    first=parseInt(first);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/obsch/12_fasad/"+(first+i-180)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/obsch/12_fasad/"+(first+i-180)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";					
				}	
				for(i=181; i<190; i++){								
					nn=eval(first+i);
					//alert(nn);
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")) , parseInt(this.id.replace("ob_", ""))+nn-9 );}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff( parseInt(this.id.replace("ob_", "")), parseInt(this.id.replace("ob_", ""))+nn-9 );};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}

	}
    if(type=="kv4"){
			first_im=document.getElementById('ob_51').src;
			//alert(last_im);
			fi = first_im.split("/");
			num_f=fi[fi.length-1].split(".");			
            first = num_f[0].replace("_", "");
			if(parseInt(first)==(maxim-8)){
			   return false;
			}
			if(parseInt(first) < (maxim-8)){			   
			    for(i=51; i<60; i++){
				    first=parseInt(first);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/privat/kv4/"+(first+i-50)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/privat/kv4/"+(first+i-50)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";					
				}	
				for(i=51; i<60; i++){								
					nn=eval(first+i);
					//alert(nn);
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")) , parseInt(this.id.replace("ob_", ""))+nn-9 );}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff( parseInt(this.id.replace("ob_", "")), parseInt(this.id.replace("ob_", ""))+nn-9 );};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}

	}
    if(type=="kv5"){
			first_im=document.getElementById('ob_71').src;
			//alert(last_im);
			fi = first_im.split("/");
			num_f=fi[fi.length-1].split(".");			
            first = num_f[0].replace("_", "");
			if(parseInt(first)==(maxim-8)){
			 // alert("d");
			   return false;
			}
			if(parseInt(first) < (maxim-8)){			   
			    for(i=71; i<80; i++){
				    first=parseInt(first);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/privat/kv5/"+(first+i-70)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/privat/kv5/"+(first+i-70)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";					
				}	
				for(i=71; i<80; i++){								
					nn=eval(first+i);
					//alert(nn);
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")) , parseInt(this.id.replace("ob_", ""))+nn-9 );}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff( parseInt(this.id.replace("ob_", "")), parseInt(this.id.replace("ob_", ""))+nn-9 );};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}

	}
    if(type=="kv6"){
			first_im=document.getElementById('ob_91').src;
			//alert(last_im);
			fi = first_im.split("/");
			num_f=fi[fi.length-1].split(".");			
            first = num_f[0].replace("_", "");
			if(parseInt(first)==(maxim-8)){
			 // alert("d");
			   return false;
			}
			if(parseInt(first) < (maxim-8)){			   
			    for(i=91; i<100; i++){
				    first=parseInt(first);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/privat/kv6/"+(first+i-90)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/privat/kv6/"+(first+i-90)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";					
				}	
				for(i=91; i<100; i++){								
					nn=eval(first+i);
					//alert(nn);
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")) , parseInt(this.id.replace("ob_", ""))+nn-9 );}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff( parseInt(this.id.replace("ob_", "")), parseInt(this.id.replace("ob_", ""))+nn-9 );};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}

	}
    if(type=="kv7"){
			first_im=document.getElementById('ob_111').src;
			fi = first_im.split("/");
			num_f=fi[fi.length-1].split(".");			
            first = num_f[0].replace("_", "");
			if(parseInt(first)==(maxim-8)){
			   return false;
			}
			if(parseInt(first) < (maxim-8)){			   
			    for(i=111; i<120; i++){
				    first=parseInt(first);
					document.getElementById('ob_'+i).src="/templates/art-triumph/images/privat/kv7/"+(first+i-110)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/privat/kv7/"+(first+i-110)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";					
				}	
				for(i=111; i<120; i++){								
					nn=eval(first+i);
					document.getElementById('ob_'+i.toString()).onmouseover=function(){obschOn( parseInt(this.id.replace("ob_", "")) , parseInt(this.id.replace("ob_", ""))+nn-9 );}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('ob_'+i.toString()).onmouseout=function(){obschOff( parseInt(this.id.replace("ob_", "")), parseInt(this.id.replace("ob_", ""))+nn-9 );};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}

	}
    if(type=="eks"){
			first_im=document.getElementById('pr_201').src;
			//alert(last_im);
			fi = first_im.split("/");
			num_f=fi[fi.length-1].split(".");			
            first = num_f[0].replace("_", "");
			if(parseInt(first)==(maxim-8)){
			 // alert("d");
			   return false;
			}
			if(parseInt(first) < (maxim-8)){			   
			    for(i=201; i<210; i++){
				    first=parseInt(first);
					document.getElementById('pr_'+i).src="/templates/art-triumph/images/project/eks/"+(first+i-200)+"_.jpg";
					document.getElementById('prhr_'+i).href="javascript:window.open('/templates/art-triumph/images/project/eks/"+(first+i-200)+".jpg','','width=640; height=480;scrollbars=yes');void(0);";					
				}	
				for(i=201; i<210; i++){								
					nn=eval(first+i);
					document.getElementById('pr_'+i.toString()).onmouseover=function(){proOn( parseInt(this.id.replace("pr_", "")), parseInt(this.id.replace("pr_", ""))+nn-9-200 );}//{proOn(parseInt(this.id.replace("pr_", "")),nn-proOn(parseInt(this.id.replace("pr_", "")));};         //{"proOn("+(first+i)+","+(first+i)+");"};//function(){alert(eval(i));}//{proOn(i,first+i);}; //"//"proOn("+(first+i)+","+(first+i)+");";
					document.getElementById('pr_'+i.toString()).onmouseout=function(){proOff( parseInt(this.id.replace("pr_", "")), parseInt(this.id.replace("pr_", ""))+nn-9-200 );};//{"proOff("+(first+i)+","+(first+i)+");"};//function(){proOff(i,first+i);};				
				}
			}

	}
	 
}