// JavaScript Document




function checkOver(btn){
	
	
		
		btn.className = btn.className +"_over";
		if(parent.is_IE =='1'){
			btn.style.cursor='hand';
		}else{
			
			btn.style.cursor='pointer';
			
		}

	
}





function checkOut(btn){
	
	
	re = /_over/gi;
	
	if(btn.className.match(re)){
		
		newClass = btn.className.replace(re,"");
		
		btn.className = newClass;
	}
	if(parent.is_IE =='1'){
		btn.style.cursor='default';
	}
	
	
}



function checkScroll(){
	
	
	h = Math.abs(parent.document.body.clientHeight - 200);
	
	h1 = Math.abs(document.getElementById('main_table').clientHeight);
	
	//alert(h);
	//alert(h1);
	
	if(h1 > h){
		//alert("scroll");
		document.body.scroll='yes';
		btn_width=180
		if(parent.is_IE != '1'){
			document.body.style.overflowX = "hidden";
		}
		
		
	}else{
		//alert("noscroll");
		document.body.scroll='no';
		btn_width=200
		if(parent.is_IE != '1'){
			document.body.style.overflowX = "hidden";
		}
		
	}
	
	fm = document.theForm;
	for(i=0;i<fm.length;i++){
		
		
		if(fm[i].type == "button"){
			
			fm[i].style.width = btn_width;
			
		}
		
	}
	
}



function loadPage(page){
	

	parent.document.getElementById('main_frame').src = page;
	
	
}

var site_name = "dialahunk.co.uk";

function setUpLink(){




}


var current_links = "";
var current_btn = 0;
function toggleLinks(links,as_child,btn){
	
	//alert("as_child: "+as_child+"\nbtn: "+btn+"\nCurrent Btn: "+current_btn+"\nlinks:"+links+"\nCurrent links: "+current_links );
	
	
	if(document.getElementById(links)){
		
		thisMenu = document.getElementById(links).style;
		thisMenu.display = (thisMenu.display == "block") ? "none":"block";
		
		
	
	}
	closeAllOtherLinks(links);
	


}


function closeAllOtherLinks(links){
	
		var e=document.getElementsByTagName("input");

		for(var i=0;i<e.length;i++){
			
			id = e[i].id;
			
			if(id.substr(0,4) == "btn_"){
				
					this_link = "LINKS"+id.split("_")[1];
					
					if(this_link != links){
						if(document.getElementById(this_link)){
							document.getElementById(this_link).style.display = "none";
						}
					}
			}
			
		}

	
}

function deleteCookie(){
	


expireDate = new Date
expireDate = new Date
expireDate.setMonth(expireDate.getMonth()-6);
if(document.cookie != ""){
document.cookie = "displayedLinks_"+site_name+"=;expires="+expireDate.toGMTString();
displayedLinks = new Array();
}

}