
function findPosX(objb){
  var obj = document.getElementById(objb);
	var curleft = 0;
	if (obj.offsetParent){
		while (obj.offsetParent){
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(objb){
  var obj = document.getElementById(objb);
	var curtop = 0;
	if (obj.offsetParent){
		while (obj.offsetParent){
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}else if (obj.y)
		curtop += obj.y;
	return curtop;
}

function navigationGreenM(img){
  var selectedElement = document.getElementById(img);
  selectedElement.src = "/img/navigation/" + img + "_green.gif";
}

function navigationPinkM(img){
  var selectedElement = document.getElementById(img);
  selectedElement.src = "/img/navigation/" + img + "_pink.gif";
}

function navigationGreen(img){
  var selectedElement = document.getElementById(img);
  selectedElement.src = "/img/navigation/" + img + "_green.gif";
}

function navigationPink(img){
  var selectedElement = document.getElementById(img);
  selectedElement.src = "/img/navigation/" + img + "_pink.gif";
}

function showDropDownMenu(){
  /* rotate the image of about us as well */
  var selectedElement = document.getElementById('about_us');
  selectedElement.src = "/img/navigation/about_us_pink.gif";

  var drop = document.getElementById('drpDown');
  drop.style.left = findPosX('about_us');
  drop.style.top = findPosY('about_us')+15;
  drop.style.display = "block";
}

function hideDropDownMenu(){
  var drop = document.getElementById('drpDown');
  drop.style.display = "none";

  /* rotate the image of about us as well */
  var selectedElement = document.getElementById('about_us');
  selectedElement.src = "/img/navigation/about_us_green.gif";
}

function showDropDownMenuM(){
  /* rotate the image of about us as well */
  var selectedElement = document.getElementById('about_us');
  selectedElement.src = "/img/navigation/about_us_pink.gif";

  var drop = document.getElementById('drpDown');
  var NS6 = document.getElementById && !document.all;
  if(NS6){
    drop.style.left = findPosX('about_us') + "px";
    drop.style.top = findPosY('about_us') + 15 + "px";
  }else{
    drop.style.left = findPosX('about_us');
    drop.style.top = findPosY('about_us')+15;
  }
  drop.style.display = "block";
}

function hideDropDownMenuM(){
  var drop = document.getElementById('drpDown');
  drop.style.display = "none";

  /* rotate the image of about us as well */
  var selectedElement = document.getElementById('about_us');
  selectedElement.src = "/img/navigation/about_us_green.gif";
}


function determineResolution(){
  var wsize = screen.width;
  var main = document.getElementById("mainTable");
  var container = document.getElementById("content");
  var foot = document.getElementById("footer");
  
  if(wsize <= 1024){
    main.style.width = "990";
    main.style.backgroundImage = "url('/img/background_top_1024.gif')";
    /* make sure to adjust the padding-column */
    try{
      foot.style.paddingLeft = "95px";
      container.style.paddingLeft = "130px";
    }catch(exception){}  
  }else{
    main.style.width = "1081";
    main.style.backgroundImage = "url('/img/background_top.gif')";
    /* make sure to adjust the padding-column */
    try{
      container.style.paddingLeft = "125px";
    }catch(exception){}  
  }
}

function determineResolutionMain(){
  var wsize = screen.width;
  var main = document.getElementById("mainTable");
  var foot = document.getElementById("footer");
  var container = document.getElementById("content");
  
  if(wsize <= 1024){
    main.style.width = "990";
    main.style.backgroundImage = "url('/img/background_top_1024.gif')";
    /* make sure to adjust the padding-column */
    try{
      foot.style.paddingLeft = "95px";
      container.style.paddingLeft = "130px";
    }catch(exception){}  
  }else{
    main.style.width = "1081";
    main.style.backgroundImage = "url('/img/background_top.gif')";
    /* make sure to adjust the padding-column */
    try{
      container.style.paddingLeft = "125px";
    }catch(exception){}  
  }
}

function showDropDownMenuPlan(){var selectedElement=document.getElementById('plan_your_wedding');
selectedElement.src="/img/navigation/plan_your_wedding_pink.gif";
var drop=document.getElementById('drpDownPlan');
drop.style.left=findPosX('plan_your_wedding');
drop.style.top=findPosY('plan_your_wedding')+15;
drop.style.display="block";
}
function hideDropDownMenuPlan(){
var drop=document.getElementById('drpDownPlan');
drop.style.display="none";
var selectedElement=document.getElementById('plan_your_wedding');
selectedElement.src="/img/navigation/plan_your_wedding_green.gif";
}


