var globalTabHeight = 66;

openFile = function(urlPath, winOptions){
	var fp = urlPath.replace("../", "");	
	window.open(fp,"ORMAP_file", "width=700,height=600");
}

objectPositionTop = function(obj) {       
	var curtop = 0;      
	if (obj.offsetParent) {             
		do {                                   
			curtop += obj.offsetTop;             
		} while (obj = obj.offsetParent);       
	}       
	return curtop; 
} 

calcContentHeight = function(obj,type){
	var iReturn = 300;
	var h = $(window).height();
	var objX = objectPositionTop(obj);
		
	if(type=='tab'){
		var iReturn = (Math.max(((h-objX)-110),iReturn));
	}else if (type=='cal'){
		var iReturn = (Math.max(((h-objX)-160),iReturn));
	}else if (type=='maplist'){
		var iReturn = (Math.max(((h-objX)-160),iReturn));
	}
	
	return iReturn;
}

function getUrlVars() {     
	var vars = [], hash;     
	var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');     
	for(var i = 0; i < hashes.length; i++) {         
		hash = hashes[i].split('=');         
		vars.push(hash[0]);         
		vars[hash[0]] = hash[1];     
	}     
	return vars; 
}
