<!--

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// --> 


// for making objects show/hide
function toggle (objName,objProperty){
	document.getElementById(objName).style.display = objProperty

// first time guest book show
	if(objName == 'theLoadCover')
	frame1.location.href='guestbook.php'
	
// face movemnent true
	if(objName == 'homePageLoad')
	pageLoadComplete = true
}





// for homepage top boxes 

boxOpening=false
expanding = true
function expandOut (theBox){
if (boxOpening == false)
	expand(theBox)
}

function expand (boxObj){
currentBox = document.getElementById(boxObj)
newWidth = currentBox.offsetWidth -1
newHeight = currentBox.offsetHeight -1
	if (newWidth < 270){
		expanding = true
		boxOpening = true
		newWidth +=10
		newHeight +=5
		currentBox.style.width = newWidth+"px";
		currentBox.style.height = newHeight+"px";
		setTimeout("expand('"+boxObj+"')", 20);
	}
	else{
	expanding = false
	}
}

function collapse (boxObj){
currentBox = document.getElementById(boxObj)
newWidth = currentBox.offsetWidth -1
newHeight = currentBox.offsetHeight -1
	if (newWidth > 170){
		boxOpening = true
		newWidth -=10
		newHeight -=5
		currentBox.style.width = newWidth+"px";
		currentBox.style.height = newHeight+"px";
		setTimeout("collapse('"+boxObj+"')", 20);
	}
	else {
		boxOpening = false
		expanding = true
	}
}



//for picture gallery
currentImgNum = 0
imgWidth = 136
totalImg = 10
speed =15
theMovement = 0
animatingDiv = "animator"
animation = false

function next(){
	if(currentImgNum <= totalImg-2 && animation == false){
		document.getElementById('theLLnk').style.color = "#333333"
		currentImgNum ++
		nextImgAni(currentImgNum*imgWidth)
	}
	if(currentImgNum == totalImg-1){
		document.getElementById('theRLnk').style.color = "#aaaaaa"
	}
}
function prev(){
	if(currentImgNum >= 1 && animation == false){
		document.getElementById('theRLnk').style.color = "#333333"
		currentImgNum --
		prevImgAni(currentImgNum*imgWidth)
	}
	if(currentImgNum == 0){
		document.getElementById('theLLnk').style.color = "#aaaaaa"
	}
}
function nextImgAni(thePosition){
	if(theMovement <= thePosition-speed){
		animation = true
		theMovement = theMovement + speed
		document.getElementById(animatingDiv).style.marginLeft= -theMovement+"px"
		setTimeout('nextImgAni('+thePosition+')', 20);	
	}
	else{
		animation = false
		document.getElementById(animatingDiv).style.marginLeft = -thePosition+"px"
	}
}
function prevImgAni(thePosition){
	if(theMovement >= thePosition+speed){
		animation = true
		theMovement = theMovement - speed
		document.getElementById(animatingDiv).style.marginLeft= -theMovement+"px"
		setTimeout('prevImgAni('+thePosition+')', 20);	
	}
	else{
		animation = false
		document.getElementById(animatingDiv).style.marginLeft = -thePosition+"px"
	}
}


