﻿function GetCityDescription(city) {
  CloseEverything();
  var cityTextDiv = document.getElementById('CityTextDiv');
  document.getElementById('CityHeader').innerHTML = '<h1>' + city + '</h1>';
  cityTextDiv.style.display = 'block';
}

function GetHoroscope(zodiac) {
  CloseEverything();
  var divToShow = null;
  if (zodiac == 'e') {
    document.getElementById('EZHeader').innerHTML = '<h1>' + document.getElementById('uxChineseZodiacSign').innerHTML + '</h1>';
    divToShow = document.getElementById('ChineseZodiacDiv');
  }
  else {
    document.getElementById('WZHeader').innerHTML = '<h1>' + document.getElementById('uxZodiacSign').innerHTML + '</h1>';
    divToShow = document.getElementById('WesternZodiacDiv');
  }
  if (divToShow) {
    divToShow.style.display = 'block';
  }
}

function GetInterview() {
  CloseEverything();
  var interviewTextDiv = document.getElementById('InterviewTextDiv');
  interviewTextDiv.style.display = 'block';
}

function CloseEverything() {
  document.getElementById('CityTextDiv').style.display = 'none';
  document.getElementById('InterviewTextDiv').style.display = 'none';
  document.getElementById('WesternZodiacDiv').style.display = 'none';
  document.getElementById('ChineseZodiacDiv').style.display = 'none';
}

var photosArray = new Array();
var lastImage = 1;

function ScrollPhotos(theDirection) {
  if (photosArray.length == 0) {
    FillPhotosArray();
  }
  var theImage = document.getElementById('uxPhoto');
  var newPhotonumber = lastImage;
  if (theImage) {
    var countOfPhotos = photosArray.length;
    if (countOfPhotos > 1) {
      if (theDirection == '+') {
        if (lastImage == countOfPhotos) {
          newPhotonumber = 1;
        }
        else {
          newPhotonumber++;
        }
      }
      else {
        if (lastImage == 1) {
          newPhotonumber = countOfPhotos;
        }
        else {
          newPhotonumber--;
        }
      }
      lastImage = newPhotonumber;
      theImage.src = photosArray[newPhotonumber - 1];
    }
  }
}

function FillPhotosArray() {
  for (i = 1; i < 7; i++) {
    var hiddenImg = document.getElementById('uxHiddenImage' + i);
    if (hiddenImg) {
      var imagePath = new String(hiddenImg.innerHTML);
      if (imagePath.length > 0) {
        photosArray[i - 1] = imagePath;
      }
    }
  }
}

function joinPath() {
  var f = document.getElementById('joinfrm');
  if (f) {
    var loc = document.getElementById('uxIslocal');
    if (loc) {
      var isLocal = parseInt(loc.innerHTML);
      if (isLocal == 1)
        f.src = 'http://localhost/loveboat/securehrb/membership/quickjoinform.aspx';
    }
    var test = document.getElementById('uxIsTest');
    var isTest = parseInt(test.innerHTML);
    if (isTest == 1)
      f.src = 'http://securetest.hotrussianbrides.com/membership/quickjoinform.aspx';
  }
}

function doStuff() {
  var uxAboutMe = document.getElementById('uxAboutMe');
  if (uxAboutMe) {
    var AboutMe = document.getElementById('AboutMe');
    if (AboutMe) {
      AboutMe.innerHTML = uxAboutMe.innerHTML
    }
  }
  var uxLookingFor = document.getElementById('uxLookingFor');
  if (uxLookingFor) {
    var LookingFor = document.getElementById('LookingFor');
    if (LookingFor) {
      LookingFor.innerHTML = uxLookingFor.innerHTML
    }
  }
}

