// JavaScript Document ----> Written by Triple S - July 2005
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;

function preloadImages() {
	if (document.images) {
		drawings_over = newImage("templates/layout01/images/drawings-over.gif");
		about_over = newImage("templates/layout01/images/about-over.gif");
		links_over = newImage("templates/layout01/images/links-over.gif");
		preloadFlag = true;
	}
}

function force_redirect() // This is the redirect from the .tk domain
{
  setTimeout("open_window()", 2500);
}
function open_window() // This is the redirect from the .tk domain
{
	window.open("http://greyart.gr.funpic.org/index.php","_parent");
}
function open_cms_login()
{
	window.open("index.php?blz=login","_self");
}
function open_cms()
{
	window.open("cms.php","_self");
}
function over_change(where,the_color)	
{
		document.getElementById(where).style.background =the_color
}
function open_tab(where,id)
{
	//alert(where);
	document.getElementById('info_'+id).style.height = "0px";
	document.getElementById('info_'+id).style.border = "none";
	document.getElementById('info_'+id).style.overflow = "hidden";
	document.getElementById('info_'+id).style.zIndex = "0";
		document.getElementById('info_button_'+id).style.borderBottom = "#CCCCCC 1px solid";
		document.getElementById('info_button_'+id).style.backgroundColor = "#EEEEEE";
		document.getElementById('info_button_'+id).style.zIndex = "0";
	
	document.getElementById('show_'+id).style.height = "0px";
	document.getElementById('show_'+id).style.border = "none";
	document.getElementById('show_'+id).style.overflow = "hidden";
	document.getElementById('show_'+id).style.zIndex = "0";
		document.getElementById('show_button_'+id).style.borderBottom = "#CCCCCC 1px solid";
		document.getElementById('show_button_'+id).style.backgroundColor = "#EEEEEE";
		document.getElementById('show_button_'+id).style.zIndex = "0";
				
	document.getElementById('post_'+id).style.height = "0px";
	document.getElementById('post_'+id).style.border = "none";
	document.getElementById('post_'+id).style.overflow = "hidden";
	document.getElementById('post_'+id).style.zIndex = "0";
		document.getElementById('post_button_'+id).style.borderBottom = "#CCCCCC 1px solid";
		document.getElementById('post_button_'+id).style.backgroundColor = "#EEEEEE";
		document.getElementById('post_button_'+id).style.zIndex = "0";


	document.getElementById(where+id).style.height = "160px";
	document.getElementById(where+id).style.border = "#CCCCCC 1px solid";
	document.getElementById(where+id).style.overflow = "auto";
	document.getElementById(where+id).style.zIndex = "1";
		document.getElementById(where+'button_'+id).style.borderBottom = "none";
		document.getElementById(where+'button_'+id).style.backgroundColor = "#FFFFFF";
		document.getElementById(where+'button_'+id).style.zIndex = "2";

/*def setting in css:
width:0px;
height:0px;
overflow:hidden;
position:absolute;
left:0px;
top:0px;
*/
	// div properties here
}
