var curentPgHowto = 1;
var maxPgHowTo = 7;

function closeH2(){
self.parent.tb_remove();
curentPgHowto = 1; 
try{document.getElementById('stepH2').style.backgroundImage="url(http://static.fashiondays.ro/app/webroot/images/step"+curentPgHowto+".jpg)";}catch(e){}

/*if(detectBrowser()==7 || detectBrowser()==6){
var t=setTimeout("fixIE6Height()",10);
}*/

try {checkDisplayNext();checkDisplayPrev();} catch(e) {}


}
function checkDisplayNext(){
 if(curentPgHowto+1==maxPgHowTo)
 document.getElementById('idnextH2').style.display="none";
 else 
 document.getElementById('idnextH2').style.display="block";
}

function checkDisplayPrev(){
 if(curentPgHowto==1)
 document.getElementById('idprevH2').style.display="none";
 else 
 document.getElementById('idprevH2').style.display="block";
}

function nextH2(){
 curentPgHowto++;
 checkDisplayPrev();
 checkDisplayNext();
 
 if(curentPgHowto==6){
 curentPgHowto =1;
 Boxy.load(base + '/users/preregister/', {cache: true, title: ' ', modal: true, closeText: 'inchide'});
 
 closeH2();
 }else
 document.getElementById('stepH2').style.backgroundImage="url(http://static.fashiondays.ro/app/webroot/images/step"+curentPgHowto+".jpg)";
}
function prevH2(){
 curentPgHowto--;
 checkDisplayPrev();
 checkDisplayNext();
 document.getElementById('stepH2').style.backgroundImage="url(http://static.fashiondays.ro/app/webroot/images/step"+curentPgHowto+".jpg)";
}
