function clearForm(form){
// function used in search feature ---
	form.search.value = "" ;
}

function popup(mylink, windowname) {
	if (! window.focus)return true;
	var href;
	if (typeof(mylink) == 'string')
	   href=mylink;
	else
	   href=mylink.href;
	window.open(href, windowname, 'width=800,height=600,resize=yes,scrollbars=yes');
}


function showLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "visible";
}

function hideLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "hidden";
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}

function hideSubmenu() {
	hideLayer('submenu_ad1');
	hideLayer('submenu_ad2');
	hideLayer('submenu_ad3');
	hideLayer('submenu_ad4');
	hideLayer('submenu_travel5');
	hideLayer('submenu_travel6');
	hideLayer('submenu_travel7');
	hideLayer('submenu_travel8');
	hideLayer('submenu_travel9');
	hideLayer('submenu_travel10');
	hideLayer('submenu_contact11');
	hideLayer('submenu_contact12');
	hideLayer('submenu_contact13');
	hideLayer('submenu_contact14');
	hideLayer('submenu_contact15');
	hideLayer('submenu_contact16');
	hideLayer('submenu_contact17');
	hideLayer('submenu_contact18');
}

function showSubmenu(id) {
	hideSubmenu();
	showLayer(id);
}

function printPageContent()
{
	PrintWindow = window.open("","PrintWindow","width=10,height=10,noscrollbars,noresize,nostatus");
	PrintWindow.document.write ("<HTML><HEAD>");
	PrintWindow.document.write ("<LINK rel=\"stylesheet\" type=\"text/css\" href=\"common.css\" />");
	PrintWindow.document.write ("<LINK rel=\"stylesheet\" type=\"text/css\" href=\"print.css\" />");
	PrintWindow.document.write ("</HEAD>");
	PrintWindow.document.write ("<BODY onload=\"window.print();window.close();\" style=\"background-color: #FFFFFF;\">"
	+ "<DIV id=\"content\">"
	+	"<DIV class=\"searchresults\">" 
	+ printable.innerHTML + "</DIV></DIV></BODY></HTML>");
	PrintWindow.document.close();
}

/****************************************************
*	        DOM Image rollover:
*		by Chris Poole
*		http://chrispoole.com
*               Script featured on http://www.dynamicdrive.com
*		Keep this notice intact to use it :-)
****************************************************/

function init() {
  if (!document.getElementById) return
  var imgOriginSrc;
  var imgTemp = new Array();
  var imgarr = document.getElementsByTagName('img');
  for (var i = 0; i < imgarr.length; i++) {
    if (imgarr[i].getAttribute('hsrc')) {
        imgTemp[i] = new Image();
        imgTemp[i].src = imgarr[i].getAttribute('hsrc');
        imgarr[i].onmouseover = function() {
            imgOriginSrc = this.getAttribute('src');
            this.setAttribute('src',this.getAttribute('hsrc'))
        }
        imgarr[i].onmouseout = function() {
            this.setAttribute('src',imgOriginSrc)
        }
    }
  }
}

onload = init;


