function toggleElement(strLayerID,strAction){
	var oAlertLayer = document.getElementById(strLayerID)
	if(oAlertLayer){
		oAlertLayer.style.display = strAction;
	}
}

function JQSlide(oElement,oIEElement) {
	if(document.all) {
		// Different code for IE
		var oh = $(oElement).height();

		if ($(oIEElement).length  > 0)
		{
			var ot = $(oIEElement).position().top;
			if ($(oElement).is(":hidden"))
			{
				$(oIEElement).css({ position: "absolute", top: ot }).animate({ top: ot + oh }, "slow", function() { $("div.hp_wrapper").css("margin-top", "auto"); $(oIEElement).css("position", "static") }); //.css({marginTop: 0});
			}
			else
			{
				$(oIEElement).css({ position: "absolute", top: ot }).animate({ top: ot - oh }, "slow", function() { $("div.hp_wrapper").css("margin-top", "auto"); $(oIEElement).css("position", "static") }); //.css({marginTop: 0});
			}
		}

		if ($(oElement).is(":hidden"))
		{		
			$("div.hp_wrapper").css("margin-top",oh + "px");
			$(oElement).slideDown("slow");
		}
		else
		{
			$("div.hp_wrapper").css("margin-top",oh + "px");
			$(oElement).slideUp("slow");
		}
	} else {
		$(oElement).slideToggle("slow");
	}
}

function random_imglink(){
	var imgs = new Array()
	//specify random images below. You can have as many as you wish
	imgs[0] = "/images/page/ad_exhibition.gif";
	imgs[1] = "/images/page/ad_career.gif";
	
	var altText=new Array()
	//specify alt tags below.
	altText[0] = "AIRMIC Conference &amp; Exhibition";
	altText[1] = "Work with us - Lorem ipsum dolor sit amet, consectetur";
	
	var bnrLink=new Array()
	//specify alt tags below.
	bnrLink[0] = "#";
	bnrLink[1] = "#";
	
	var ry=Math.floor(Math.random()*imgs.length)

	var bnrhtml = '<a href=\"'+bnrLink[ry]+'\"><img src=\"'+imgs[ry]+'\" width=\"325\" height=\"89\" alt=\"'+altText[ry]+'\"></a>';
	$("#hp_rotBanner").html(bnrhtml);
}


