﻿function highlight(me){
	fullname=me.src
	gifindex=fullname.indexOf('.gif')
	mainname=fullname.substr(0,gifindex)
	highlightname=mainname+'-h.gif';
	me.src=highlightname;
}

function lowlight(me){
	fullname=me.src
	gifindex=fullname.indexOf('-h.gif')
	mainname=fullname.substr(0,gifindex)
	lowlightname=mainname+'.gif';
	me.src=lowlightname;
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}


function showmenu(elmnt)
{	
	document.getElementById(elmnt).style.visibility="visible"
}

function hidemenu(elmnt)
{
	document.getElementById(elmnt).style.visibility="hidden"
}

function highbg(me)
{	
	me.style.background='#ff8c53'
	me.style.color ='#b43522'
	
}

function lowbg(me)
{	
	me.style.background='#b43522'
	me.style.color='#ffe970'
}

function openlink(elmnt){
	document.location = 'index.php?nav='+elmnt;
}

function comment(mytype){
window.open('../comments/index.php?type='+mytype,'commentwindow',"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=430, height=550")

}

function senddesign(){
window.open('senddesign.html','senddesignwindow',"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=780, height=600")

}

function opensearch(){

myWindow=window.open('search.php','searchwin','width=350,height=120,toolbar=no, location=no, status=no');
myWindow.focus()

}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : "; expires="+exdate.toGMTString());
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf("advanced");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1 ;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return ""
}