var index=2;
var time_LoadProccess;
var myImage = new Image()
//
function outbg(elem,evt)
{ 
 var tp = evt.type;
 if(tp=="mouseover")
 {
  if(elem.id=="t") elem.style.color="#B69C00"; 
  else  elem.style.background="#f9f9f9"; 
 }
 if(tp=="mouseout")
 {
  if(elem.id=="t") elem.style.color="#1F81C8";
  else elem.style.background="#FFFFFF";
 }
}
//
function loadblood(path)
{
 document.getElementById("heading").innerHTML="<nobr>&nbsp;&nbsp;&nbsp;&nbsp;"+document.getElementById("blood").innerHTML+"<nobr>";
 document.getElementById("maindiv").innerHTML  = "<div style=\"position:relative; left:-270px; top:10px;\"></div>";
 forLoadDocuments.document.location.href = path;
 if(index<=9) document.getElementById("image").innerHTML = "<img src='http://www.bakucity.az/images/slideshow/s0"+index+".jpg'>";
 else document.getElementById("image").innerHTML = "<img src='http://www.bakucity.az/images/slideshow/s"+index+".jpg'>";
 index++;
 if(index==31) index=1;  
}
//
function loadpage(path,elem)
{
 viewPicture();
 document.getElementById("heading").innerHTML = "<nobr>&nbsp;&nbsp;&nbsp;&nbsp;"+elem.innerHTML+"<nobr>";
 document.getElementById("maindiv").innerHTML  = "<div style=\"position:relative; left:-270px; top:10px;\"></div>";
 forLoadDocuments.document.location.href = path;
}
//
function viewPicture()
{
 if(index<=9) myImage.src = "http://www.bakucity.az/images/slideshow/s"+index+".jpg";
 else myImage.src = "http://www.bakucity.az/images/slideshow/s0"+index+".jpg";
 time_LoadProccess = setInterval("CheckPicture()",50);
 index++;
 if(index==9) index=1;
}
//
function CheckPicture()
{ 
 if(myImage.complete)
 { 
  clearInterval(time_LoadProccess);
  document.getElementById("picPicture").src = myImage.src;
 }
}
//
function loadfotopage(path,elem)
{
 document.getElementById("heading").innerHTML = "<nobr>&nbsp;&nbsp;&nbsp;&nbsp;"+elem.getAttribute('alt')+"<nobr>";
 document.getElementById("maindiv").innerHTML  = "<div style=\"position:relative; left:-270px; top:10px;\"></div>";
 forLoadDocuments.document.location.href = path;
}
//
function loadDocument()
{
 document.getElementById("maindiv").innerHTML = forLoadDocuments.document.getElementById("ToParent").innerHTML;
}
//
function outcolor(elem,evt)
{
 var tp = evt.type;
 if(tp=="mouseover")
 {
  elem.style.color="#B69C00";
  elem.style.textDecoration = "underline";
 }
 if(tp=="mouseout")
 {
  elem.style.color="#1F81C8";
  elem.style.textDecoration = "none";
 }
}
//
function outfoto(elem,evt)
{
 var tp = evt.type;
 if(tp=="mouseover")
 {
  elem.style.textDecoration = "underline";
 }
 if(tp=="mouseout")
 {
  elem.style.textDecoration = "none";
 }
}
//
function openlink(link)
{
 var width=583;
 var height=560;
 var str21 = "toolbar=no, scrollbars=yes, resizable=no, width="+width+", height="+height+", status=no, location=no, top=" + 
	          ((screen.height-height)/2) + " left=" + ((screen.width-width)/2);
 var wnd = window.open(link, '', str21);
  
}
//
function map(link)
{
 var width=835;
 var height=600;
 var str21 = "toolbar=no, scrollbars=yes, resizable=no, width="+width+", height="+height+", status=yes, location=no, top=" + 
	          ((screen.height-height)/2) + " left=" + ((screen.width-width)/2);
 var wnd = window.open(link, '', str21);
}
//
function outmap(elem,evt)
{
 var tp = evt.type;
 if(tp=="mouseover")
 {
  elem.style.borderColor="#A90913";
 }
 if(tp=="mouseout")
 {
  elem.style.borderColor="#b3afa2";
 }
}
//
function viewimg(PURL,PWidth,PHeight)
{ 
 var width = PWidth;
 var height = PHeight;
 var str21 = "toolbar=no, scrollbars=no, resizable=no, width="+width+", height="+height+", status=no, location=no, top=" + 
 ((screen.height-height)/2) + " left=" + ((screen.width-width)/2);
 var wnd = window.open(PURL, '', str21);
}
function vienews(PURL,PWidth,PHeight)
{
 var width = PWidth;
 var height = PHeight;
 var str21 = "toolbar=no, scrollbars=yes, resizable=no, width="+width+", height="+height+", status=no, location=no, top=" + 
 ((screen.height-height)/2) + " left=" + ((screen.width-width)/2);
 var wnd = window.open(PURL, '', str21);
}
function openVideos(url){
  var str = "toolbar=no, scrollbars=auto, resizable=no, status=yes, location=no, width=400, height=350, left=300, top=200";			
  currentVideos = open(url, "", str);
}