

$(document).ready(function(){

	$(".menu1").hide();
	$(".menu2").hide();
	$(".menu3").hide();
	
	$(".cmenu1").click(function(){
     $(this).next(".menu1").slideToggle(500);
     $(this).next(".menu1on").slideToggle(500);
     $(this).toggleClass("cmenu1on");
     return false;
  });
	$(".cmenu1on").click(function(){
     $(this).next(".menu1").slideToggle(500);
     $(this).next(".menu1on").slideToggle(500);
     $(this).addClass("cmenu1");
     $(this).toggleClass("cmenu1on");
     return false;
  });
    
	$(".cmenu2").click(function(){
     $(this).next(".menu2").slideToggle(500);
     return false;
  });
	$(".cmenu2").click(function(){
     $(this).next(".menu2on").slideToggle(500);
     return false;
  });
    
	$(".cmenu3").click(function(){
     $(this).next(".menu3").slideToggle(500);
     return false;
  });
	$(".cmenu3").click(function(){
     $(this).next(".menu3on").slideToggle(500);
     return false;
  });
    
	

		
		//авторизованный линк
		$('.auth').click(function(){
			var link=$(this).attr('href');
			location.href=link; 
		});
			



});



var RClass = Array();

function mov(id){
	if(document.getElementById && document.getElementById(id)){
		var thisClass = document.getElementById(id).className;
		RClass[id] = thisClass;
		document.getElementById(id).className = thisClass+" mBig_sel";
		document.getElementById(id+"a").className = thisClass+" mBig_sel";
	}  
}

function mot(id){
	if(document.getElementById && document.getElementById(id))
		document.getElementById(id).className = RClass[id];
		document.getElementById(id+"a").className = RClass[id];
}

function sov(id,stl){
	if(document.getElementById && document.getElementById(id)){
		var thisClass = document.getElementById(id).className;
		RClass[id] = thisClass;
		document.getElementById(id).className = thisClass+" ost"+stl;
	}  
}

function sot(id){
	if(document.getElementById && document.getElementById(id))
		document.getElementById(id).className = RClass[id];
}

function order(val){
	location.href = "http://online.versa.ru/order.php?gs="+val;
}

function go(page){
	location.href = "/"+page; 
}

function SetStep(step){
	if(document.getElementById && document.getElementById('OrderStep')){
		document.getElementById('OrderStep').value = step;
	}
}

function getClientWidth(){
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
}
function getClientHeight(){
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
}
function getElementWidth(id){
  return document.getElementById(id).offsetWidth;
}
function getElementHeight(id){
  return document.getElementById(id).offsetHeight;
}

