//CHANGE IMAGE



function change(name, dir)

{

  document.getElementById("l_" + name).src = "images/men_hor/"+ "l_" + name + "_" + dir + ".gif";

}





//OPEN WINDOW



function openWindow(url) {

    popupWin = window.open(url, 'remote',

    'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,dependent,width=705,height=480');

    popupWin.focus();

}



//function openWindow_L(url) {

//    popupWin = window.open(url, 'remote',

//    'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,dependent,width=340,height=490');

//    popupWin.focus();

//}





// CHANGE COLOUR



function changeColour(elementId) {

var interval = 400;

var colour1 = "#1076de", colour2 = "#00578a";

if (document.getElementById) {

var element = document.getElementById(elementId);

element.style.color = (element.style.color == colour1) ? colour2 : colour1;

setTimeout("changeColour('" + elementId + "')", interval);

}

}



//PRELOAD



function Preload()

{

  var doc = document;



  if (doc.images)

  {

    doc.pre = (typeof(doc.pre) == 'undefined') ? new Object() : doc.pre;



    for (arg in Preload.arguments)

    {

      doc.pre.loadedImages[arg]     = new Image();

      doc.pre.loadedImages[arg].src = Preload.arguments[arg];

    }

  }

}



//Disable right mouse click Script

//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive

//For full source code, visit http://www.dynamicdrive.com



//var message="Function Disabled!";



//function clickIE4(){

//  if (event.button==2){

//    return false;

//  }

//}



//function clickNS4(e){

//  if (document.layers||document.getElementById&&!document.all){

//    if (e.which==2||e.which==3){

//      return false;

//    }

//  }

//}



//if (document.layers){

//  document.captureEvents(Event.MOUSEDOWN);

//  document.onmousedown=clickNS4;

//}

//else if (document.all&&!document.getElementById){

//  document.onmousedown=clickIE4;

//}



//document.oncontextmenu=new Function("return false")



function check_month(prefix)

{

  month_box = document.getElementById(prefix + '_m');

  day_box   = document.getElementById(prefix + '_d');

  month	    = month_box.value;

  limit	    = 32;



  if ((4  == month) || 

      (6  == month) || 

      (7  == month) || 

      (9  == month) || 

      (11 == month))

  {limit = 31;}



  if (2 == month)

  {limit = 30;}



  for (i = 1; i < limit; i++)

  {

    day_box.length		= i;

    day_box.options[i-1].text   = i;

    day_box.options[i-1].value  = i;

  }

}



function check_email()

{

  email	  = document.getElementById('email');

  submit  = document.getElementById('submit');



  if (' ' == email.value)

  {

    email.value	    = '';

    submit.disabled = true;

  }

  else if (("" == email.value) ||

           (-1 == email.value.indexOf("@")))

  {

    submit.disabled = true;

  }

  else

  {

    submit.disabled = false;

  }

}



function check_find()

{

  howfindus		  = document.getElementById('howfindus');

  other			  = document.getElementById('other');

  other.style.display	  = 'none';

  other.style.visibility  = 'hidden';



  if (howfindus.selectedIndex == (howfindus.length - 1))

  {

    other.style.display	    = 'block';

    other.style.visibility  = 'visible';

    other.value		    = 'Type other here...';

  }

}

function changeMetaDesc(desc) {
	var metas = document.getElementsByTagName('meta');
	for (var x=0,y=metas.length; x<y; x++) {
	  if (metas[x].name.toLowerCase() == "description") {
		metas[x].content = desc;
	  }
	}
}
