function checkForSrollbar() {
	var frame_element = document.getElementById("main-iframe"); 
	var frame_window  = document.frames["main-iframe"]; 
	if(frame_element.offsetHeight < frame_window.document.body.scrollHeight) {  
		return true; //alert("Needs scrollbar"); 
	}else{
		return false; //alert("Doesn't Need scrollbar");
	}
}

function resizeIframe() {
	var client_height = parent.top.document.body.clientHeight;
	var client_width = parent.top.document.body.clientWidth;
	
	document.getElementById("main-iframe").style.height = parseInt(client_height-274);
	document.getElementById("main-iframe").style.width = parseInt(client_width-448);
	
	if (checkForSrollbar() == true) {
		document.getElementById("headers-iframe").style.width = parseInt(client_width-454);
		document.getElementById("headers-iframe").style.right = 104;
		document.getElementById("white-line").style.width = parseInt(client_width-208);
		document.getElementById("white-line").style.right = 104
	}else{
		document.getElementById("headers-iframe").style.width = parseInt(client_width-474);
		document.getElementById("headers-iframe").style.right = 124;
		document.getElementById("white-line").style.width = parseInt(client_width-238);
		document.getElementById("white-line").style.right = 124;
	}
}

function openPopCenter(p_width, p_height, p_name, p_url, p_scroll) {
	var pos_y = (screen.width - p_width) / 2;
	var pos_x = (screen.height - p_height) / 2;
	win_popup = 'width='+p_width+',height='+p_height+',left='+pos_y+',top='+pos_x+',menubar=0,location=0,toolbar=0,personalbar=0,status=0,scrollbars='+p_scroll+',titlebar=0'
	win = window.open(p_url, p_name, win_popup)
}

function openProdSel() {
	p_url = "http://www.eurocol.com/productselector.htm"
	p_width = "800"
	p_height = "620"
	var pos_y = (screen.width - p_width) / 2;
	var pos_x = (screen.height - p_height) / 2;
	win_popup = 'width='+p_width+',height='+p_height+',left='+pos_y+',top='+pos_x+',menubar=0,location=0,toolbar=0,personalbar=0,status=no,scrollbars=1,titlebar=0'
	win = window.open(p_url, "poputo", win_popup)
}
