// Custom Scroll Bars (11-08-2005)
// by Vic Phillips http://www.vicsjavascripts.org.uk


// Functional Code - NO Need to change

var csbObj,csbDragX,csbMseX,csbDragY,csbMseY,csbTO,csbSpd,csbD;

function csbCustomXScroll(){
 csbarg=csbCustomXScroll.arguments;
 for (csb0=0;csb0<csbarg.length;csb0+=2){
  csbdobj=document.getElementById(csbarg[csb0]);
  if (csbdobj.tagName=='IFRAME'){ csbiobj=window.frames[csbarg[csb0]].document.getElementsByTagName('DIV')[0]; }
  else { csbiobj=csbdobj.getElementsByTagName('DIV')[0];  }
  csbpobj=document.getElementById(csbarg[csb0+1]);
  csbsobj=csbpobj.getElementsByTagName('DIV')[0];
  csblobj=csbpobj.getElementsByTagName('DIV')[1];
  csbrobj=csbpobj.getElementsByTagName('DIV')[2];
  csbsobj.os=0;
  if (csblobj&&csbrobj){
   csbsobj.os=csblobj.offsetWidth;
   csblobj.obj=csbsobj;
   csblobj.onmousedown=function(){ csbSpd=1; csbLeftRight(this.obj,1); }
   csblobj.onmouseup=function(){ clearTimeout(csbTO); }
   csblobj.style.left='0px';
   csblobj.style.zIndex=1;
   csbrobj.obj=csbsobj;
   csbrobj.onmousedown=function(){ csbSpd=1; csbLeftRight(this.obj,0); }
   csbrobj.onmouseup=function(){ clearTimeout(csbTO); }
   csbrobj.style.left=(csbpobj.offsetWidth-csbrobj.offsetWidth)+'px';
   csbrobj.style.zIndex=1;
  }
  csbsobj.style.left=(csbsobj.os)+'px';
  csbsobj.onmousedown=function(event){ csbXMseDown(event,this);}
  csbsobj.inw=csbiobj.offsetWidth-csbdobj.offsetWidth+csbsobj.offsetWidth*2;
  csbsobj.pw=csbsobj.parentNode.offsetWidth-csbsobj.offsetWidth;
  csbsobj.obj=csbiobj;
  csbsobj.objos=csbiobj.offsetLeft;
 }
}

function csbCustomYScroll(){
 csbarg=csbCustomYScroll.arguments;
 for (csb0=0;csb0<csbarg.length;csb0+=2){
  csbdobj=document.getElementById(csbarg[csb0]);
  if (csbdobj.tagName=='IFRAME'){ csbiobj=window.frames[csbarg[csb0]].document.getElementsByTagName('DIV')[0]; }
  else { csbiobj=csbdobj.getElementsByTagName('DIV')[0];  }
  csbpobj=document.getElementById(csbarg[csb0+1]);
  csbsobj=csbpobj.getElementsByTagName('DIV')[0];
  csbtobj=csbpobj.getElementsByTagName('DIV')[1];
  csbbobj=csbpobj.getElementsByTagName('DIV')[2];
  csbsobj.os=0;
  if (csbtobj&&csbtobj){
   csbsobj.os=csbtobj.offsetHeight;
   csbtobj.obj=csbsobj;
   csbtobj.onmousedown=function(){ csbSpd=1; csbUpDown(this.obj,1); }
   csbtobj.onmouseup=function(){ clearTimeout(csbTO); }
   csbtobj.style.top='0px';
   csbtobj.style.zIndex=1;
   csbbobj.obj=csbsobj;
   csbbobj.onmousedown=function(){ csbSpd=1; csbUpDown(this.obj,0); }
   csbbobj.onmouseup=function(){ clearTimeout(csbTO); }
   csbbobj.style.top=(csbpobj.offsetHeight-csbbobj.offsetHeight)+'px';
  }
  csbsobj.style.top=(csbsobj.os)+'px';
  csbsobj.onmousedown=function(event){ csbYMseDown(event,this);}
  csbsobj.inh=csbiobj.offsetHeight-csbdobj.offsetHeight;
  csbsobj.ph=csbpobj.offsetHeight-csbsobj.offsetHeight-csbsobj.os*0;
  csbsobj.obj=csbiobj;
  csbsobj.objos=csbiobj.offsetTop;
 }
}

function csbLeftRight(csbobj,csbd){
 csbObj=csbobj; csbD=csbd;
 if (csbD){ csbObj.style.left=(csbObj.offsetLeft-csbSpd)+'px'; }
 else { csbObj.style.left=(csbObj.offsetLeft+csbSpd)+'px'; }
 csbPosInnerX();
 csbSpd=csbSpd*1.1;
 if (csbSpd>95){ csbSpd=95; }
 if (csbObj.offsetLeft>0+csbObj.os&&csbObj.offsetLeft<csbObj.pw-csbObj.os){
  csbTO=setTimeout('csbLeftRight(csbObj,csbD)',100-csbSpd);
 }
 else {
  if (csbObj.offsetLeft<csbObj.os){ csbObj.style.left=csbObj.os+'px'; }
  if (csbObj.offsetLeft>csbObj.pw-csbObj.os){ csbObj.style.left=(csbObj.pw-csbObj.os)+'px'; }
  csbPosInnerX();
 }
}

function csbUpDown(csbobj,csbd){
 csbObj=csbobj; csbD=csbd;
 if (csbD){ csbObj.style.top=(csbObj.offsetTop-csbSpd)+'px'; }
 else { csbObj.style.top=(csbObj.offsetTop+csbSpd)+'px'; }
 csbPosInnerY();
 csbSpd=csbSpd*1.1;
 if (csbSpd>95){ csbSpd=95; }
 if (csbObj.offsetTop>0+csbObj.os&&csbObj.offsetTop<csbObj.ph-csbObj.os){
  csbTO=setTimeout('csbUpDown(csbObj,csbD)',100-csbSpd);
 }
 else {
  if (csbObj.offsetTop<csbObj.os){ csbObj.style.top=csbObj.os+'px'; }
  if (csbObj.offsetTop>csbObj.ph-csbObj.os){ csbObj.style.top=(csbObj.ph-csbObj.os)+'px'; }
  csbPosInnerY();
 }
}

function csbXMseDown(event,csbobj) {
 document.onmousemove=function(event){csbXDrag(event);}
 document.onmouseup=function(event){csbMseUp(event);}
 csbObj=csbobj;
 csbMse(event);
 csbDragX=csbMseX-csbObj.offsetLeft;
}

function csbXDrag(event) {
 csbMse(event);
 if ((csbMseX-csbDragX)>0+csbObj.os&&(csbMseX-csbDragX)<csbObj.pw-csbObj.os){
  csbObj.style.left=(csbMseX-csbDragX)+'px';
 }
 csbPosInnerX();
}

function csbYMseDown(event,csbobj) {
 document.onmousemove=function(event){csbYDrag(event);}
 document.onmouseup=function(event){csbMseUp(event);}
 csbObj=csbobj;
 csbMse(event);
 csbDragY=csbMseY-csbObj.offsetTop;
}

function csbYDrag(event) {
 csbMse(event);
 if ((csbMseY-csbDragY)>=csbObj.os&&(csbMseY-csbDragY)<csbObj.ph-csbObj.os){
  csbObj.style.top=(csbMseY-csbDragY)+'px';
 }
 csbPosInnerY();
}

function csbMse(event){
 if(!event) var event=window.event;
 if (document.all){ csbMseX=event.clientX; csbMseY=event.clientY; }
 else {csbMseX=event.pageX; csbMseY=event.pageY; }
}

function csbMseUp(event) {
 document.onmousemove=null; csbDragX=-1; csbDragY=-1;
}

function csbPosInnerX() {
 csbObj.obj.style.left=(-((csbObj.offsetLeft-csbObj.os)*csbObj.inw/(csbObj.pw-csbObj.os*2))+csbObj.objos)+'px'
}

function csbPosInnerY(){
 csbObj.obj.style.top=(-((csbObj.offsetTop-csbObj.os)*csbObj.inh/(csbObj.ph-csbObj.os*2))+csbObj.objos)+'px'
}


//window.onload = function() { csbCustomYScroll('databox','scrollboxY');}

/************position footer**************/

		<!--
		function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}
		
		
		/*
		function setFooter() {
			if (document.getElementById) {
				var windowHeight = getWindowHeight();
				if (windowHeight > 0) {
					var contentHeight = document.getElementById('container').offsetHeight;
					var footerElement = document.getElementById('lowrow');
					var footerHeight  = footerElement.offsetHeight;
					if (windowHeight - (contentHeight + footerHeight) >= 0) {
						footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
					}
					else {
						footerElement.style.top = '0px';
					}
				}
			}
		}
		window.onload = function() {
			setFooter();
		}
		window.onresize = function() {
			setFooter();
		}*/
		//-->
		

	

/**************set footer by resizing main-inner ************/

function resizemaininnerheight() {
	var pageHeight = document.body.clientHeight;	
	var windowHeight = getWindowHeight();

	var bannerElement = document.getElementById('banner');
	var bannerHeight = bannerElement.offsetHeight;
	
	var lowrowElement = document.getElementById('lowrow');
	var lowrowHeight = lowrowElement.offsetHeight;

	var maininnerElement = document.getElementById('main-inner');
	var x = maininnerElement.style.offsetHeight;

	if (windowHeight > pageHeight) {
			maininnerElement.style.height = (windowHeight - ((lowrowHeight + bannerHeight)+ 50 ) +'px');
						
	}
else {
			maininnerElement.style.height = (pageHeight - (lowrowHeight + bannerHeight) +'px');
			}
}
/*window.onload = function() { resizemaininnerheight();}
window.onresize = function() { resizemaininnerheight();}
*/



/**************set footer  on pages with one column by resizing content-onecol-inner ************/

function resizecontentonecolinnerheight() {
	var pageHeight = document.body.clientHeight;	
	var windowHeight = getWindowHeight();

	var bannerElement = document.getElementById('banner');
	var bannerHeight = bannerElement.offsetHeight;
	
	var lowrowElement = document.getElementById('lowrow');
	var lowrowHeight = lowrowElement.offsetHeight;

	var contentonecolinnerElement = document.getElementById('content-onecol-inner');
	var x = contentonecolinnerElement.style.offsetHeight;

	if (windowHeight > pageHeight) {
			contentonecolinnerElement.style.height = (windowHeight - ((lowrowHeight + bannerHeight)+ 50 ) +'px');
						
	}
else {
			contentonecolinnerElement.style.height = (pageHeight - (lowrowHeight + bannerHeight) +'px');
			}
}
/*window.onload = function() { resizemaininnerheight();}
window.onresize = function() { resizemaininnerheight();}
*/




/* Nifty Corners Cube - rounded corners with CSS and Javascript
Copyright 2006 Alessandro Fulciniti (a.fulciniti@html.it)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

var niftyOk=(document.getElementById && document.createElement && Array.prototype.push);
var niftyCss=false;

String.prototype.find=function(what){
return(this.indexOf(what)>=0 ? true : false);
}

var oldonload=window.onload;
if(typeof(NiftyLoad)!='function') NiftyLoad=function(){};
if(typeof(oldonload)=='function')
    window.onload=function(){oldonload();AddCss();NiftyLoad()};
else window.onload=function(){AddCss();NiftyLoad()};

function AddCss(){
niftyCss=true;
var l=CreateEl("link");
l.setAttribute("type","text/css");
l.setAttribute("rel","stylesheet");
l.setAttribute("href","/css/niftyCorners.css");
l.setAttribute("media","screen");
document.getElementsByTagName("head")[0].appendChild(l);
}

function Nifty(selector,options){
if(niftyOk==false) return;
if(niftyCss==false) AddCss();
var i,v=selector.split(","),h=0;
if(options==null) options="";
if(options.find("fixed-height"))
    h=getElementsBySelector(v[0])[0].offsetHeight;
for(i=0;i<v.length;i++)
    Rounded(v[i],options);
if(options.find("height")) SameHeight(selector,h);
}

function Rounded(selector,options){
var i,top="",bottom="",v=new Array();
if(options!=""){
    options=options.replace("left","tl bl");
    options=options.replace("right","tr br");
    options=options.replace("top","tr tl");
    options=options.replace("bottom","br bl");
    options=options.replace("transparent","alias");
    if(options.find("tl")){
        top="both";
        if(!options.find("tr")) top="left";
        }
    else if(options.find("tr")) top="right";
    if(options.find("bl")){
        bottom="both";
        if(!options.find("br")) bottom="left";
        }
    else if(options.find("br")) bottom="right";
    }
if(top=="" && bottom=="" && !options.find("none")){top="both";bottom="both";}
v=getElementsBySelector(selector);
for(i=0;i<v.length;i++){
    FixIE(v[i]);
    if(top!="") AddTop(v[i],top,options);
    if(bottom!="") AddBottom(v[i],bottom,options);
    }
}

function AddTop(el,side,options){
var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(options.find("alias") || (color=getBk(el))=="transparent"){
    color="transparent";bk="transparent"; border=getParentBk(el);btype="t";
    }
else{
    bk=getParentBk(el); border=Mix(color,bk);
    }
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Top");
if(options.find("small")){
    d.style.marginBottom=(p-2)+"px";
    btype+="s"; lim=2;
    }
else if(options.find("big")){
    d.style.marginBottom=(p-10)+"px";
    btype+="b"; lim=8;
    }
else d.style.marginBottom=(p-5)+"px";
for(i=1;i<=lim;i++)
    d.appendChild(CreateStrip(i,side,color,border,btype));
el.style.paddingTop="0";
el.insertBefore(d,el.firstChild);
}

function AddBottom(el,side,options){
var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(options.find("alias") || (color=getBk(el))=="transparent"){
    color="transparent";bk="transparent"; border=getParentBk(el);btype="t";
    }
else{
    bk=getParentBk(el); border=Mix(color,bk);
    }
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Bottom");
if(options.find("small")){
    d.style.marginTop=(p-2)+"px";
    btype+="s"; lim=2;
    }
else if(options.find("big")){
    d.style.marginTop=(p-10)+"px";
    btype+="b"; lim=8;
    }
else d.style.marginTop=(p-5)+"px";
for(i=lim;i>0;i--)
    d.appendChild(CreateStrip(i,side,color,border,btype));
el.style.paddingBottom=0;
el.appendChild(d);
}

function CreateStrip(index,side,color,border,btype){
var x=CreateEl("b");
x.className=btype+index;
x.style.backgroundColor=color;
x.style.borderColor=border;
if(side=="left"){
    x.style.borderRightWidth="0";
    x.style.marginRight="0";
    }
else if(side=="right"){
    x.style.borderLeftWidth="0";
    x.style.marginLeft="0";
    }
return(x);
}

function CreateEl(x){
return(document.createElement(x));
}

function FixIE(el){
if(el.currentStyle!=null && el.currentStyle.hasLayout!=null && el.currentStyle.hasLayout==false)
    el.style.display="inline-block";
}

function SameHeight(selector,maxh){
var i,v=selector.split(","),t,j,els=[],gap;
for(i=0;i<v.length;i++){
    t=getElementsBySelector(v[i]);
    els=els.concat(t);
    }
for(i=0;i<els.length;i++){
    if(els[i].offsetHeight>maxh) maxh=els[i].offsetHeight;
    els[i].style.height="auto";
    }
for(i=0;i<els.length;i++){
    gap=maxh-els[i].offsetHeight;
    if(gap>0){
        t=CreateEl("b");t.className="niftyfill";t.style.height=gap+"px";
        nc=els[i].lastChild;
        if(nc.className=="niftycorners")
            els[i].insertBefore(t,nc);
        else els[i].appendChild(t);
        }
    }
}

function getElementsBySelector(selector){
var i,j,selid="",selclass="",tag=selector,tag2="",v2,k,f,a,s=[],objlist=[],c;
if(selector.find("#")){ //id selector like "tag#id"
    if(selector.find(" ")){  //descendant selector like "tag#id tag"
        s=selector.split(" ");
        var fs=s[0].split("#");
        if(fs.length==1) return(objlist);
        f=document.getElementById(fs[1]);
        if(f){
            v=f.getElementsByTagName(s[1]);
            for(i=0;i<v.length;i++) objlist.push(v[i]);
            }
        return(objlist);
        }
    else{
        s=selector.split("#");
        tag=s[0];
        selid=s[1];
        if(selid!=""){
            f=document.getElementById(selid);
            if(f) objlist.push(f);
            return(objlist);
            }
        }
    }
if(selector.find(".")){      //class selector like "tag.class"
    s=selector.split(".");
    tag=s[0];
    selclass=s[1];
    if(selclass.find(" ")){   //descendant selector like tag1.classname tag2
        s=selclass.split(" ");
        selclass=s[0];
        tag2=s[1];
        }
    }
var v=document.getElementsByTagName(tag);  // tag selector like "tag"
if(selclass==""){
    for(i=0;i<v.length;i++) objlist.push(v[i]);
    return(objlist);
    }
for(i=0;i<v.length;i++){
    c=v[i].className.split(" ");
    for(j=0;j<c.length;j++){
        if(c[j]==selclass){
            if(tag2=="") objlist.push(v[i]);
            else{
                v2=v[i].getElementsByTagName(tag2);
                for(k=0;k<v2.length;k++) objlist.push(v2[k]);
                }
            }
        }
    }
return(objlist);
}

function getParentBk(x){
var el=x.parentNode,c;
while(el.tagName.toUpperCase()!="HTML" && (c=getBk(el))=="transparent")
    el=el.parentNode;
if(c=="transparent") c="#FFFFFF";
return(c);
}

function getBk(x){
var c=getStyleProp(x,"backgroundColor");
if(c==null || c=="transparent" || c.find("rgba(0, 0, 0, 0)"))
    return("transparent");
if(c.find("rgb")) c=rgb2hex(c);
return(c);
}

function getPadding(x,side){
var p=getStyleProp(x,"padding"+side);
if(p==null || !p.find("px")) return(0);
return(parseInt(p));
}

function getStyleProp(x,prop){
if(x.currentStyle)
    return(x.currentStyle[prop]);
if(document.defaultView.getComputedStyle)
    return(document.defaultView.getComputedStyle(x,'')[prop]);
return(null);
}

function rgb2hex(value){
var hex="",v,h,i;
var regexp=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;
var h=regexp.exec(value);
for(i=1;i<4;i++){
    v=parseInt(h[i]).toString(16);
    if(v.length==1) hex+="0"+v;
    else hex+=v;
    }
return("#"+hex);
}

function Mix(c1,c2){
var i,step1,step2,x,y,r=new Array(3);
if(c1.length==4)step1=1;
else step1=2;
if(c2.length==4) step2=1;
else step2=2;
for(i=0;i<3;i++){
    x=parseInt(c1.substr(1+step1*i,step1),16);
    if(step1==1) x=16*x+x;
    y=parseInt(c2.substr(1+step2*i,step2),16);
    if(step2==1) y=16*y+y;
    r[i]=Math.floor((x*50+y*50)/100);
    r[i]=r[i].toString(16);
    if(r[i].length==1) r[i]="0"+r[i];
    }
return("#"+r[0]+r[1]+r[2]);
}


/*******************slideshow*******************/

function checkCanDoSwitcher() {
	if (navigator.userAgent.indexOf("MSIE") != -1 && navigator.userAgent.indexOf("Mac") != -1) {return false;}
	else {return true;}
}

var canDoSwitcher = checkCanDoSwitcher();

function startListClickTV(startChan) {
	if (!(startChan == "welcome" || startChan == "listing" || startChan == "editing" || startChan == "adding" || startChan == "contact" || startChan == "pricelist" || startChan == "social")) {startChan = "welcome";}
	var lastTV = document.getElementById(startChan);
	document.getElementById(startChan).className = "show";
	if (document.getElementById && canDoSwitcher) {
		var listRoot = document.getElementById("featurechanger");
		for (i=0; i<listRoot.childNodes.length; i++) {
			var node = listRoot.childNodes[i];
			if (node.nodeName == "LI") {
				for (j=0; j<node.childNodes.length; j++) {
					var subnode = node.childNodes[j];
						if (document.all && navigator.userAgent.indexOf("Opera") == -1) {
							if (subnode.getAttribute("className") == "slidelinks") {
								subnode.onmouseover = function() {
									if (lastTV!="") {lastTV.className = "";}
									this.parentNode.className = "show";
									lastTV=this.parentNode;
									return false;
								}
							}
						}
						else if (subnode.nodeName == "DIV" && subnode.getAttribute("class") == "slidelinks") {
						subnode.onmouseover = function() {
							if (lastTV!="") {lastTV.className = "";}
							this.parentNode.className = "show";
							lastTV=this.parentNode;
							return false;
						}
					}
				}
			}
		}
	}
}

function popwin(aPage, aTarget, w, h, var1, var2){window.open(aPage,aTarget,'status=no,scrollbars=' +((var1=='scroll' || var2=='scroll')? 'yes' : 'no')+ ',resizable=' +((var1=='resize' || var2=='resize')? 'yes' : 'no')+ ',width='+w+',height='+h);}






/*
Script Name: Javascript Cookie Script
Author: Public Domain, with some modifications
Script Source URI: http://techpatterns.com/downloads/javascript_cookies.php
Version 1.0.0
Last Update: 30 May 2004

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
*/

// this function gets the cookie, if it exists
function Get_Cookie( name ) {
	
	var start = document.cookie.indexOf( name + "=" );
	var len = start + name.length + 1;
	if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) )
	{
		return null;
	}
	if ( start == -1 ) return null;
	var end = document.cookie.indexOf( ";", len );
	if ( end == -1 ) end = document.cookie.length;
	return unescape( document.cookie.substring( len, end ) );
}

/*
only the first 2 parameters are required, the cookie name, the cookie
value. Cookie time is in milliseconds, so the below expires will make the 
number you pass in the Set_Cookie function call the number of days the cookie
lasts, if you want it to be hours or minutes, just get rid of 24 and 60.

Generally you don't need to worry about domain, path or secure for most applications
so unless you need that, leave those parameters blank in the function call.
*/
function Set_Cookie( name, value, expires, path, domain, secure ) {
	// set time, it's in milliseconds
	var today = new Date();
	today.setTime( today.getTime() );
	// if the expires variable is set, make the correct expires time, the
	// current script below will set it for x number of days, to make it
	// for hours, delete * 24, for minutes, delete * 60 * 24
	if ( expires )
	{
		expires = expires * 1000 * 60 * 60 * 24;
	}
	//alert( 'today ' + today.toGMTString() );// this is for testing purpose only
	var expires_date = new Date( today.getTime() + (expires) );
	//alert('expires ' + expires_date.toGMTString());// this is for testing purposes only

	document.cookie = name + "=" +escape( value ) +
		( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + //expires.toGMTString()
		( ( path ) ? ";path=" + path : "" ) + 
		( ( domain ) ? ";domain=" + domain : "" ) +
		( ( secure ) ? ";secure" : "" );
}

// this deletes the cookie when called
function Delete_Cookie( name, path, domain ) {
	if ( Get_Cookie( name ) ) document.cookie = name + "=" +
			( ( path ) ? ";path=" + path : "") +
			( ( domain ) ? ";domain=" + domain : "" ) +
			";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
