function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


// editted by Crafting Solutions - craftingsolutions.com
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
  if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
  if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
     else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
  settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=yes,menubar=no,toolbar=yes,resizable=yes';
  win=window.open(mypage,myname,settings);}


// editted by Crafting Solutions - craftingsolutions.com
//if (document.all||document.getElementById)
//document.body.style.background="url('http://www.lakehousedirect.com/preview/_borders/faded_bg.jpg') white center no-repeat fixed"

  NS4 = (document.layers) ? 1 : 0;
  IE4 = (document.all) ? 1 : 0;
  ver4 = (NS4 || IE4) ? 1 : 0;   
  isMac = (navigator.appVersion.indexOf("Mac") != -1) ? 1 : 0;
  isTrans = (NS4 || (IE4 && !isMac)) ? 1 : 0;
  var version = ""
  
  if( NS4 ) 
	function InputFocused( anInput )
	{
		if( IE4 ) {
			anInput.style.background="#E6E6FA"
			anInput.style.color="#000000"
		}
	}

	function InputBlured( anInput )
	{
		if( IE4 ) {
			anInput.style.background="#F5F5F5"
			anInput.style.color="#000000"
		}
	}


//Find the center of the window
//document.body.offsetHeight

var intWidth = 0;

function SetWidth(){

	if(NS4){
		intWidth = window.innerWidth;
	}
	else
	{
		intWidth = window.document.body.offsetWidth;
	}


	intWidth = (intWidth / 2) - 250;
	if(intWidth < 150)
		intWidth = 150;
	//alert(intWidth);

}

// Drag and Drop Script
var dragapproved=false
var z,x,y
function move(){
if (event.button==1&&dragapproved){
z.style.pixelLeft=temp1+event.clientX-x
z.style.pixelTop=temp2+event.clientY-y
return false
}
}
function drags(){
if (!document.all)
return
if (event.srcElement.className=="drag"){
dragapproved=true
z=event.srcElement
temp1=z.style.pixelLeft
temp2=z.style.pixelTop
x=event.clientX
y=event.clientY
document.onmousemove=move
}
}
document.onmousedown=drags
document.onmouseup=new Function("dragapproved=false")

///////////////////////////////////////////////////////////////////
/*Site Logo Script (Geocities Watermark)
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and TOS, visit http://www.dynamicdrive.com/ */
///////////////////////////////////////////////////////////////////

//edit the below 6 steps

// 1) substitute 116 and 42 with the width and height of your logo image, respectively
var logowidth=95
var logoheight=52
var staticlogo=new Image(logowidth,logoheight)

// 2) change the image path to reflect the path of your logo image
staticlogo.src="http://hc2.humanclick.com/hc/75265766/?cmd=repstate&site=75265766&imageUrl=http://www.ladybuttonfabrics.com/liveperson/&ver=1"

// 3) Change url below to the target URL of the logo
var logolink="http://hc2.humanclick.com/hc/75265766/?SESSIONVAR!identifier=Ladybutton+Fabric+Customer&VISITORVAR!name=Ladybutton+Fabrics+Customer&cmd=file&file=visitorWantsToChat&site=75265766&byhref=1"

// 4) change the alttext variable to reflect the text used for the "alt" attribute of the image tag
var alttext="Speak live with Ladybuttons"

// 5) set below to either "1" or "0" ("1" fades the logo into view) Note: IE 4 specific
var fadeintoview=1

// 6) Finally, below variable determines the duration the logo should be visible after loading, in seconds. If you'd like the logo to appear for 20 seconds, for example, enter 20. Entering a value of 0 causes the logo to be perpectually visible. 
var visibleduration=0

var onclick="window.open('http://hc2.humanclick.com/hc/75265766/?SESSIONVAR!identifier=Ladybutton+Fabrics+Customer&VISITORVAR!name=Ladybutton+Fabrics+Customer&cmd=file&file=visitorWantsToChat&site=75265766&special=chatImage:http://www.ladybuttonfabrics.com/liveperson/dude1.gif,bgcolor:9966CC','chat75265766','width=472,height=320');return false;"

///////////////////////////Do not edit below this line/////////////////////////

var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (ns4)
setTimeout("window.onresize=regenerate",400)
}


var fadeset=''
if (fadeintoview)
fadeset="filter:alpha(opacity=0)"

if (ie4)
document.write('<span id="logo" style="'+fadeset+';position:absolute;top:100;width:'+staticlogo.width+';height:'+staticlogo.height+'"></span>')

function bringintoview(){
if (logo.filters.alpha.opacity<=95)
logo.filters.alpha.opacity+=5
else{
clearInterval(viewit)
if (visibleduration!=0)
setTimeout("logo.style.visibility='hidden'",visibleduration*1000)
}
}

function createlogo(){
staticimage=new Layer(100)
staticimage.left=-300
staticimage.top=120
staticimage.document.write('<a onclick="'+onclick+'" target=chat75265766 href="'+logolink+'"><img src="'+staticlogo.src+'" border=0 name=hcIcon alt="'+alttext+'"></a>')
staticimage.document.close()
staticimage.visibility="show"
regenerate2()
staticitns()
}

if (ns4)
window.onload=createlogo;
else if (ie4)
crosslogo=document.all.logo
else if (ns6)
crosslogo=document.getElementById("logons6")

if (ie4||ns6){
w=ns6? window.innerWidth-logowidth-18 : document.body.clientWidth-crosslogo.style.pixelWidth-5
h=ns6? window.innerHeight-logoheight-5 : document.body.clientHeight-crosslogo.style.pixelHeight-5
crosslogo.style.left=w
crosslogo.style.top=h
}

function logoit(){
var w2=ns6? pageXOffset+w : document.body.scrollLeft+w
var h2=ns6? pageYOffset+h : document.body.scrollTop+h
crosslogo.style.left=w2
crosslogo.style.top=h2
}
function logoit2(){
staticimage.left=pageXOffset+window.innerWidth-staticimage.document.width-18
staticimage.top=pageYOffset+window.innerHeight-staticimage.document.height-5
}

function insertimage(){
crosslogo.innerHTML='<a onclick="'+onclick+'" target=chat75265766 href="'+logolink+'"><img src="'+staticlogo.src+'" border=0 name=hcIcon alt="'+alttext+'"></a>'
if (ie4){
if (fadeintoview)
viewit=setInterval("bringintoview()",100)
else{
if (visibleduration!=0)
setTimeout("crosslogo.style.visibility='hidden'",visibleduration*1000)
}
}
}

if (ie4){
window.onscroll=logoit
window.onresize=new Function("window.location.reload()")
window.onload=insertimage
}
else if (ns6){
startstatic=setInterval("logoit()",100)
window.onload=insertimage
window.onresize=new Function("window.location.reload()")
if (visibleduration!=0)
setTimeout("crosslogo.style.visibility='hidden';clearInterval(startstatic)",visibleduration*1000)
}


function staticitns(){
startstatic=setInterval("logoit2()",90)
if (visibleduration!=0)
setTimeout("staticimage.visibility='hide';clearInterval(startstatic)",visibleduration*1000)
}