function printLink(strArr,subj) {
	if(subj == null) {subj ='';};
	document.write('<a class="text" href="mailto:&#' + strArr.join(";&#") + ';?subject=' + subj + '" rel="nofollow">&#' + strArr.join(';&#') + '</a>');
}

// GET OBJECT BY ID
function gO(obj_id) {return document.getElementById(obj_id);}
 
// Show or Hide element
function setVis(element_id,visible) {
	el=document.getElementById(element_id);
	if(visible == null) visible = el.style.display
	el.style.display = (visible == '') ? 'none' : '';
}

function intoVal(value, mode) {
	mode = (mode != null) ? mode : '';
	switch(mode) {
		case "float": {
			value = ((value + '').replace(",",".")).match(/\-*\d+[.]?\d*/);
			if(value == null) return 0;
			 else return parseFloat(value);
			break;
		}
		default: {				// return integer as default
			value = (value + '').match(/\d+/);
			if(value == null) return 0;
			 else return parseInt(value);
			break;
		}
	} 
}

function in_array(the_needle, the_haystack){
	var the_hay = the_haystack.toString();
	if(the_hay == '') {return false;}
	var the_pattern = new RegExp(the_needle, 'g');
	var matched = the_pattern.test(the_haystack);
	return matched;
}