
/************************************************************************/
/*               HÄR BÖRJAR SCRIPTEN FÖR SIDORNA                        */
/*                                                                      */



function mail(text)
{
	alert(text);
}

function reply_post(postid)
{
	winInfo = window.open('medlemssidan/test.php?do=reply_post&id='+postid,'info','toolbar=no,height=410,width=500,top=300,left=300,scrollbars=no');
}

function add_post()
{
	winInfo = window.open('medlemssidan/test.php?do=add_post','info','toolbar=no,height=410,width=500,top=300,left=300,scrollbars=no');
}

function foton()
{
	winPosten = window.open('foto_upload.html','foton','toolbar=no,height=200,width=500,top=180,left=220,scrollbars=no');
}

function getDate()
{
	var modDate= new Date(document.lastModified);
	var year= modDate.getFullYear();
	var month= modDate.getMonth()+1;
	var day= modDate.getDate();
	
	if(day < 10)
	{
		day= "0"+ day;
	}
	if(month < 10)
	{
		month= "0" +month;
	}
	
	return year+ "-" +month+ "-" +day;
	
	
}

	

/* GAMMLA SCRIPT */

function setVisible2(name,name2) {
	if(document.getElementById(name)) document.getElementById(name).style.visibility = "visible";
	document.getElementById(name2).style.background="#9999CC";
}

function setVisible(name) {
	document.getElementById(name).style.visibility = "visible";
}		

function setHidden2(name,name2) {
	if(document.getElementById(name)) document.getElementById(name).style.visibility = "hidden";
	document.getElementById(name2).style.background="#DDDDDD";
}		
		
function setHidden(name) {
	document.getElementById(name).style.visibility = "hidden";
}

//Hajlajta inputfälten OnMouseover (ändrar bakgrundsfärgen)
function hiLight(a, changeTo) {
	a.style.backgroundColor = changeTo;
}
		