<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

function check_contact_form()
{

	f = document.contact_form;

	if(!ck_text(f.name, "", "Va rugam sa va introduceti numele")) return false;
	if(!validate_email(f.email, "Va rugam sa va introduceti o adresa de email valida")) return false;
	if(!ck_text(f.subject, "", "Va rugam sa adaugati un subiect mesajului dumneavoastra")) return false;
	if(!ck_text(f.message, "", "Va rugam sa completati mesajul dumneavoastra")) return false;

	return true;
}


 var Picture = new Array(); // don't change this
 var rooms   = new Array(); // don't change this
 var showHot = false;       // don't change this
 
 Picture[0]  = '../images/camere_mici/0.jpg';
 Picture[1]  = '../images/camere_mici/2.jpg';
 Picture[2]  = '../images/camere_mici/3.jpg';
 Picture[3]  = '../images/camere_mici/4.jpg';
 Picture[4]  = '../images/camere_mici/5.jpg';
 Picture[5]  = '../images/camere_mici/6.jpg';
 Picture[6]  = '../images/camere_mici/7.jpg';
 Picture[7]  = '../images/camere_mici/8.jpg';
 Picture[8]  = '../images/camere_mici/9.jpg';
 Picture[9] = '../images/camere_mici/10.jpg';
 Picture[10] = '../images/camere_mici/11.jpg';
 Picture[11] = '../images/camere_mici/12.jpg';
 Picture[12] = '../images/camere_mici/13.jpg';
 Picture[13] = '../images/camere_mici/14.jpg';
 Picture[14] = '../images/camere_mici/15.jpg';
 Picture[15] = '../images/camere_mici/16.jpg';
 Picture[16] = '../images/camere_mici/17.jpg';
 Picture[17] = '../images/camere_mici/18.jpg';
 Picture[18] = '../images/camere_mici/19.jpg';

 rooms[0] = 0; 
 rooms[1] = 2; 
 rooms[2] = 3; 
 rooms[3] = 4; 
 rooms[4] = 5; 
 rooms[5] = 6; 
 rooms[6] = 7; 
 rooms[7] = 8; 
 rooms[8] = 9; 
 rooms[9] = 10; 
 rooms[10] = 11; 
 rooms[11] = 12; 
 rooms[12] = 13; 
 rooms[13] = 14; 
 rooms[14] = 15; 
 rooms[15] = 16; 
 rooms[16] = 17; 
 rooms[17] = 18; 
 rooms[18] = 19; 
 


 var pss = Picture.length;
 preLoad = new Array();
 for (iss = 0; iss < pss; iss++){
   preLoad[iss] = new Image();
   preLoad[iss].src = Picture[iss];
 }

function init_ve(val, selectedRoom) {
  jss = 0;
  jss = val;
  
/*  document.images.PictureBox0.src = preLoad[jss].src;
  document.images.PictureBox1.src = preLoad[(jss+1)%pss].src;
  document.images.PictureBox2.src = preLoad[(jss+2)%pss].src;
  document.images.PictureBox3.src = preLoad[(jss+3)%pss].src;
  document.images.PictureBox0.border = (selectedRoom == rooms[jss])?1:0 ;
  document.images.PictureBox1.border = (selectedRoom == (rooms[(jss+1)%pss]))?1:0 ;
  document.images.PictureBox2.border = (selectedRoom == (rooms[(jss+2)%pss]))?1:0 ;
  document.images.PictureBox3.border = (selectedRoom == (rooms[(jss+3)%pss]))?1:0 ;*/
}

/*function control(how, selectedRoom){
if (showHot){
if (how=="H") jss = 0;
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (jss >= (pss)) jss=0;
if (jss < 0) jss = pss-1;
if (document.all){
document.images.PictureBox0.style.filter="blendTrans(duration=2)";
document.images.PictureBox1.style.filter="blendTrans(duration=2)";
document.images.PictureBox2.style.filter="blendTrans(duration=2)";
document.images.PictureBox3.style.filter="blendTrans(duration=2)";
document.images.PictureBox0.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox1.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox2.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox3.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox0.filters.blendTrans.Apply();
document.images.PictureBox1.filters.blendTrans.Apply();
document.images.PictureBox2.filters.blendTrans.Apply();
document.images.PictureBox3.filters.blendTrans.Apply();
}
document.images.PictureBox0.src = preLoad[jss].src;
document.images.PictureBox1.src = preLoad[(jss+1)%pss].src;
document.images.PictureBox2.src = preLoad[(jss+2)%pss].src;
document.images.PictureBox3.src = preLoad[(jss+3)%pss].src;
document.images.PictureBox0.border = (selectedRoom == rooms[jss])?1:0 ;
document.images.PictureBox1.border = (selectedRoom == (rooms[(jss+1)%pss]))?1:0 ;
document.images.PictureBox2.border = (selectedRoom == (rooms[(jss+2)%pss]))?1:0 ;
document.images.PictureBox3.border = (selectedRoom == (rooms[(jss+3)%pss]))?1:0 ;

if (document.all) {
	document.images.PictureBox0.filters.blendTrans.Play();
	document.images.PictureBox1.filters.blendTrans.Play();
	document.images.PictureBox2.filters.blendTrans.Play();
	document.images.PictureBox3.filters.blendTrans.Play();
}
}
}*/

function callRoom (val, carpet, qual) 
{
    roomnr = eval((jss+val) % pss);
    document.location.href="imagini.php?quality=" + qual + "&color=" + carpet + "&room=" + rooms[roomnr] + "&roff=" + jss + "&val=" + val;
}

function callRoomCarpet (val, carpet, qual) {
    roomnr = eval((jss+val) % pss);
    top.opener.location.href="imagini.php?color=" + carpet  + "&room=" + rooms[roomnr] + "&quality=" + qual + "&roff=" + jss;
    window.close();
}

function callColl (val) {
  document.location.href="imagini.php?collection=" + val + "&roff=" + jss;
}

function callQual (val, collection) {
  document.location.href="imagini.php?quality=" + val + "&roff=" + jss + "&collection=" + collection;
}

function callColor (val, room, quality) {
  document.location.href="imagini.php?quality=" + quality + "&color=" + val + "&room=" + room + "&roff=" + jss;
}

function callOp (val) {
  document.location.href="imagini.php?operation=" + val + "&roff=" + jss;
}


// functii de test pt iframe - uri
function callColor_test (val, room, quality, collection) {
	
		 parent.frame_qual.location.href="calitate.php?quality=" + quality + "&color=" + val + "&room=" + room + "&roff=" + jss + "&collection=" + collection;
		 parent.frame_rooms.location.href="camere.php?quality=" + quality + "&color=" + val + "&room=" + room + "&roff=" + jss + "&collection=" + collection;
		 parent.frame_princ.location.href="test.php?quality=" + quality + "&color=" + val + "&room=" + room + "&roff=" + jss + "&collection=" + collection;
	
}

function callRoom_test (val, carpet, qual, collection) 
{
	

		roomnr = eval((jss+val) % pss);
		parent.frame_qual.location.href="calitate.php?quality=" + qual + "&color=" + carpet + "&room=" + rooms[roomnr] + "&roff=" + jss + "&val=" + val + "&collection=" + collection;
		parent.frame_rooms.location.href="camere.php?quality=" + qual + "&color=" + carpet + "&room=" + rooms[roomnr] + "&roff=" + jss + "&val=" + val + "&collection=" + collection;
		parent.frame_princ.location.href="test.php?quality=" + qual + "&color=" + carpet + "&room=" + rooms[roomnr] + "&roff=" + jss + "&val=" + val + "&collection=" + collection;
	

}


