//
// global_script.js
// generel scripts usefull for maskineriet.dk
// copyright: Kenneth Graakjaer (aisforatom_at_gmail.com)
//
//

function hide_overflow() {
	document.getElementById('body_text_frame').style.overflow = 'hidden';
	return;
}

function hover_link(id, class_type) {
	document.getElementById(id).style.cursor = "pointer";
	
	if (class_type == 'sub_link' || class_type == 'white') {
		document.getElementById(id).style.color = '#F7FF7C';
	}/* else {
		document.getElementById(id).style.color = '#fdfdfd';
	}*/
}

function leave_link(id, class_type) {
	document.getElementById(id).style.cursor = 'auto';
	
	if (class_type == 'sub_link' || class_type == 'white') {
		document.getElementById(id).style.color = '#fdfdfd';
	}/* else {
		document.getElementById(id).style.color = '#000000';
	}*/
}

function go_back() {
	window.history.go(-1);
}

// retrieve the style of an element.
function get_style(source_id, IEStyleName, CSSStyleName) {
	var elem = document.getElementById(source_id);
	var target = "";
	
	if (elem.currentStyle) {
		return currentStyle[IEStyleName];
	} else if (window.getComputedStyle) {
		var compStyle = window.getComputedStyle(elem, "");
		return compStyle.getPropertyValue(CSSStyleName);
	} else {
		return target;
	}
}

