//------------------------------------------------------------------------------------------------
//-------------------------- common.js (c) UniQ Media AS -------------------------------------
//------------------------------------------------------------------------------------------------

// Pop up window
var new_window = null; 
function pop_up(url, width, height) { 
	//if (new_window != null && !new_window.closed) {
		//new_window.close(); 
	//}
	var options=""; 
	//options="toolbar,menubar,scrollbars,resizable,location,"+width="+width+",height="+height; 
	new_window = window.open(url, 'new_window'); 
	new_window.focus(); 
}

// Background color fade
var colors = 10;
var colors_arr= new Array();
colors_arr[1] = "#cc0000";
colors_arr[2] = "#e61b1b";
colors_arr[3] = "#ff3333";
colors_arr[4] = "#f64c4c";
colors_arr[5] = "#ff6666";
colors_arr[6] = "#f47f7f";
colors_arr[7] = "#ff9999";
colors_arr[8] = "#f4b2b2";
colors_arr[9] = "#ffcccc";
colors_arr[10] = "#f5e5e5";

function fade() {
	if (document.getElementById('fade')) {
    setTimeout("fade_in(1)", 1);
	 }
}

function fade_in(where) {
    if (where <= colors) {
        document.getElementById('fade').style.backgroundColor = colors_arr[where];
		  if (where < colors) {
			  where += 1;
			  setTimeout("fade_in("+where+")", 100);
			} else {
			  where += 1;
			  setTimeout("fade_in("+where+")", 100);
			  document.getElementById('fade').style.backgroundColor = "transparent";
			}

    }
}
