// Parukas.lv kolekciju float submenu JavaScript -------------------------------------------

var ShowSubMenu=0;

function DoShow() {
ShowSubMenu=1;
document.getElementById("topfloatmenukol").style.display="block";
if (document.getElementById("topfloatmenuaks").style.display="block") {document.getElementById("topfloatmenuaks").style.display="none"}
}

function DoHide() {
ShowSubMenu=0;
var t=setTimeout("RepeatShow()", 1000);
}

function RepeatShow() {
if (ShowSubMenu==0) {HideSubMenu();}
  else if (ShowSubMenu==1) {DoShow();}
}

function HideSubMenu() {
ShowSubMenu=0;
document.getElementById("topfloatmenukol").style.display="none";
}

// Parukas.lv aksesuaru float submenu JavaScript -------------------------------------------

//1111111111111111111
var ShowSubMenu1=0;

function DoShow1() {
ShowSubMenu1=1;
document.getElementById("topfloatmenukols").style.display="block";
if (document.getElementById("topfloatmenuaks").style.display="block") {document.getElementById("topfloatmenuaks").style.display="none"}
}

function DoHide1() {
ShowSubMenu1=0;
var t=setTimeout("RepeatShow1()", 1000);
}

function RepeatShow1() {
if (ShowSubMenu1==0) {HideSubMenu1();}
  else if (ShowSubMenu1==1) {DoShow1();}
}

function HideSubMenu1() {
ShowSubMenu1=0;
document.getElementById("topfloatmenukols").style.display="none";
}

//11111111111111111111


//33333333333333333333333
var ShowSubMenu3=0;

function DoShow3() {
ShowSubMenu3=1;
document.getElementById("topfloatmenuakss").style.display="block";
if (document.getElementById("topfloatmenukol").style.display="block") {document.getElementById("topfloatmenukol").style.display="none"}
}

function DoHide3() {
ShowSubMenu3=0;
var t=setTimeout("RepeatShow3()", 1000);
}

function RepeatShow3() {
if (ShowSubMenu3==0) {HideSubMenu3();}
  else if (ShowSubMenu3==1) {DoShow3();}
}

function HideSubMenu3() {
ShowSubMenu3=0;
document.getElementById("topfloatmenuakss").style.display="none";
}

//33333333333333333333333333


var ShowSubMenu2=0;

function DoShow2() {
ShowSubMenu2=1;
document.getElementById("topfloatmenuaks").style.display="block";
if (document.getElementById("topfloatmenukol").style.display="block") {document.getElementById("topfloatmenukol").style.display="none"}
}

function DoHide2() {
ShowSubMenu2=0;
var t=setTimeout("RepeatShow2()", 1000);
}

function RepeatShow2() {
if (ShowSubMenu2==0) {HideSubMenu2();}
  else if (ShowSubMenu2==1) {DoShow2();}
}

function HideSubMenu2() {
ShowSubMenu2=0;
document.getElementById("topfloatmenuaks").style.display="none";
}

// Parukas.lv slideshow JavaScript -------------------------------------------

<!-- Begin

//3-way slideshow- by Suzanne Arnold (http://jandr.com/, suzanne@mail.jandr.com)
//Script featured on JavaScript Kit (http://javascriptkit.com)
//Credit must stay intact

var Onerotate_delay = 2000; // delay in milliseconds (5000 = 5 secs)
Onecurrent = 0;
//var OneLinks = new Array(3);
//OneLinks[0] = "http://www.freewarejava.com";
//OneLinks[1] = "http://www.javascriptkit.com";
//OneLinks[2] = "http://www.dynamicdrive.com";
function Onenext() {
if (document.Oneslideform.Oneslide[Onecurrent+1]) {
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent+1].value;
document.Oneslideform.Oneslide.selectedIndex = ++Onecurrent;
   }
else Onefirst();

document.Oneslideform.parukasname.value = document.Oneslideform.Oneslide[Onecurrent].title;
}
function Oneprevious() {
if (Onecurrent-1 >= 0) {
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent-1].value;
document.Oneslideform.Oneslide.selectedIndex = --Onecurrent;
   }
else Onelast();

document.Oneslideform.parukasname.value = document.Oneslideform.Oneslide[Onecurrent].title;
}
function Onefirst() {
Onecurrent = 0;
document.images.Oneshow.src = document.Oneslideform.Oneslide[0].value;
document.Oneslideform.Oneslide.selectedIndex = 0;

document.Oneslideform.parukasname.value = document.Oneslideform.Oneslide[Onecurrent].title;
}
function Onelast() {
Onecurrent = document.Oneslideform.Oneslide.length-1;
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
document.Oneslideform.Oneslide.selectedIndex = Onecurrent;

document.Oneslideform.parukasname.value = document.Oneslideform.Oneslide[Onecurrent].title;
}
function Oneap(text) {
document.Oneslideform.status.value = (text == "Stop") ? "Slaidðovs" : "Stop";
if (document.Oneslideform.status.value == "Stop") {document.Oneslideform.Oneslidebutton2.src = "../img/slideshow_stop_ru.gif"}
  else if (document.Oneslideform.status.value == "Slaidðovs") {document.Oneslideform.Oneslidebutton2.src = "../img/slideshow_start_ru.gif"};
Onerotate();
}
function Onechange() {
Onecurrent = document.Oneslideform.Oneslide.selectedIndex;
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;

document.Oneslideform.parukasname.value = document.Oneslideform.Oneslide[Onecurrent].title;
}
function Onerotate() {
if (document.Oneslideform.status.value == "Stop") {
Onecurrent = (Onecurrent == document.Oneslideform.Oneslide.length-1) ? 0 : Onecurrent+1;
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
document.Oneslideform.Oneslide.selectedIndex = Onecurrent;
window.setTimeout("Onerotate()", Onerotate_delay);

document.Oneslideform.parukasname.value = document.Oneslideform.Oneslide[Onecurrent].title;
}
}

function ChangePic(picorder) {
//document.getElementById("Oneshow").src = "../img/noriko/"+picname+".jpg";
document.getElementById("Oneshow").src = document.Oneslideform.Oneslide[picorder].value;
document.Oneslideform.Oneslide.selectedIndex = picorder;
document.Oneslideform.parukasname.value = document.Oneslideform.Oneslide[picorder].title;
}

//function Onetransport(){
//window.location=OneLinks[Onecurrent]
//}
//  End -->


// Preload images script -----------------------------------------------------------------

<!--
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];}
}
//-->
