//onmouseover
var t=new Array(3); var b10=b11=b12=b13=b14=b15=b16=b17=b18=b19=b20=b21=b22=b23=b24=b25=0;
function cp(b){
	if(document.images){
		if((t[2])&&(t[2]==b)){
			t[0]=t[2];
			t[1]=t[3]
		}else{
			t[0]=b;
			t[1]=b.src;
			t[4]=b.src.lastIndexOf('.');
			b.src=b.src.substring(0,t[4])+'_'+b.src.substring(t[4])
		}
	}
}
function sp(){
	if(document.images){
		if((t[2])&&(t[2]!=t[0])){
			t[2].src=t[3]
		} else {
			t[2]=t[0];
		}
		t[3]=t[1];
	}
	return;
}
function op(){if(document.images){if(t[0]!=t[2])t[0].src=t[1]}}

// Navi Image Preloader
function ImagePreload()
{
	document.Preload = new Array();
	if(document.images)
	{
		for(var i=0; i < ImagePreload.arguments.length; i++)
		{
			document.Preload[i] = new Image();
			document.Preload[i].src = ImagePreload.arguments[i];
		}
	}
}

// Switch Containers Content Visibility
function switchCo(elem){
	elem = document.getElementById(elem);
	
	if(elem.parentNode)
	{
		elem.parentNode.style.height="auto";
	}
	if(elem.style.display == 'none'){
		new Effect.BlindDown(elem, {duration: 1});
	} else {
		new Effect.BlindUp(elem, {duration: 1});
	}
}
function showCo(elem){
	elem = document.getElementById(elem);
	if(elem.style.display == 'none'){
		new Effect.BlindDown(elem, {duration: 1});
	}
}
function hideCo(elem){
	elem = document.getElementById(elem);
	if(elem.style.display != 'none'){
		new Effect.BlindUp(elem, {duration: 1});
	}
}

// Switch Container Arrow Background Picture
function switchArr(elem){
// 	document.write(document.images[elem].src);
	if(document.images[elem].src == 'http://www.artandseek.com/templates/artandseek/images/container_arrow_right.gif'){
		document.images[elem].src = 'http://www.artandseek.com/templates/artandseek/images/container_arrow_down.gif';
	} else {
		document.images[elem].src = 'http://www.artandseek.com/templates/artandseek/images/container_arrow_right.gif';
	}
}

function switchArrRed(elem){
// 	document.write(document.images[elem].src);
	if(document.images[elem].src == 'http://www.artandseek.com/templates/artandseek/images/container_arrow_red_right.gif'){
		document.images[elem].src = 'http://www.artandseek.com/templates/artandseek/images/container_arrow_red_down.gif';
	} else {
		document.images[elem].src = 'http://www.artandseek.com/templates/artandseek/images/container_arrow_red_right.gif';
	}
}

// Switch Container Tabs
function switchTabs(elem){
	elem = document.getElementById(elem);
	if(elem.style.display == 'none'){
		new Effect.Appear(elem, {duration: 1});
	} else {
		new Effect.Fade(elem, {duration: 1});
	}
}

function switchCoFast(elem){
	elem = document.getElementById(elem);
	if(elem.style.display == 'none'){
		new Effect.BlindDown(elem, {duration: 0.2});
	} else {
		new Effect.BlindUp(elem, {duration: 0.2});
	}
}

function changeTab(id,state){
	if($(id))
	{
		if(state == 'inactive'){
			$(id).style.backgroundColor = '#b3bab3';
			$(id).style.border = 'none';
			$(id).style.borderBottom = '1px';
			$(id).style.borderBottomColor = '#000000';
			$(id).style.color = '#000000';
		} else {
			if(state == 'active'){
				$(id).style.backgroundColor = '#A00E0F';
				$(id).style.color = '#ffffff';
				$(id).style.border = '#A09F9F 1px solid';
				$(id).style.borderBottomColor = '#A00E0F';
			}
		}
	}
}

// 20.11.2007 12:10
function checkdatetime(elemID){
	var str = document.getElementById(elemID).value;
	var splstr=str.split(".");
	if( splstr.length == 3 ){
		var splstr2 = splstr[2].split(" ");
		var day = splstr[0];
		var month = splstr[1];
		var year = splstr2[0];
		var time = splstr2[1];
		var timearray = time.split(":");
		var hour = $timearray[0];
		var minute = $timearray[1];
		alert(day + month + year + hour + minute + "... test");
		if(str.length != 16 || day > 31 || day < 1 || month > 12 || month < 1 || year.length != 4 || hour < 1 || hour > 23 || minute < 1 || minute > 59){
			alert('The end date is not valid. Try again.');
			return false;
		}
	} else {
		alert('The end date is not valid. Try again.');
		document.getElementById(elemID).focus();
		return false;
	}
}

// init
function init(){

}