/***********************************************
* CMotion Image Gallery- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for source code
* Last updated Mar 15th, 04'. Added "End of Gallery" message.
* This copyright notice must stay intact for legal use
***********************************************/

var restarea=6 //1) width of the "neutral" area in the center of the gallery in px
var maxspeed=7 //2) top scroll speed in pixels. Script auto creates a range from 0 to top speed.
var endofgallerymsg="<span style='font-size: 11px'>.</span>" 
//3) message to show at end of gallery. Enter "" to disable message.

function enlargeimage(path, optWidth, optHeight){ //function to enlarge image. Change as desired.
var actualWidth=typeof optWidth!="undefined" ? optWidth : "600px" //set 600px to default width
var actualHeight=typeof optHeight!="undefined" ? optHeight : "500px" //set 500px to  default height
var winattributes="width="+actualWidth+",height="+actualHeight+",resizable=yes"
window.open(path,"", winattributes)
}

////NO NEED TO EDIT BELOW THIS LINE////////////

var iedom=document.all||document.getElementById
var scrollspeed=0
var movestate=""

var actualwidth=''
var cross_scroll, ns_scroll
var loadedyes=0

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function creatediv(){
statusdiv=document.createElement("div")
statusdiv.setAttribute("id","statusdiv")
document.body.appendChild(statusdiv)
statusdiv=document.getElementById("statusdiv")
statusdiv.innerHTML=endofgallerymsg
}

function positiondiv(){
menuheight=parseInt(crossmain.offsetHeight)
mainobjoffsetH=getposOffset(crossmain, "top")
statusdiv.style.left=mainobjoffset+(menuwidth/2)-(statusdiv.offsetWidth/2)+"px"
statusdiv.style.top=menuheight+mainobjoffsetH+"px"
}

function showhidediv(what){
if (endofgallerymsg!="")
statusdiv.style.visibility=what
}

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft: what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function moveleft(){
if (loadedyes){
movestate="left"
if (iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth)){
cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+"px"
showhidediv("hidden")
}
else
showhidediv("visible")
}
lefttime=setTimeout("moveleft()",10)
}

function moveright(){
if (loadedyes){
movestate="right"
if (iedom&&parseInt(cross_scroll.style.left)<0){
cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+"px"
showhidediv("hidden")
}
else
showhidediv("visible")
}
righttime=setTimeout("moveright()",10)
}

function motionengine(e){
var dsocx=(window.pageXOffset)? pageXOffset: ietruebody().scrollLeft;
var dsocy=(window.pageYOffset)? pageYOffset : ietruebody().scrollTop;
var curposy=window.event? event.clientX : e.clientX? e.clientX: ""
curposy-=mainobjoffset-dsocx
var leftbound=(menuwidth-restarea)/2
var rightbound=(menuwidth+restarea)/2
if (curposy>rightbound){
scrollspeed=(curposy-rightbound)/((menuwidth-restarea)/2) * maxspeed
if (window.righttime) clearTimeout(righttime)
if (movestate!="left") moveleft()
}
else if (curposy<leftbound){
scrollspeed=(leftbound-curposy)/((menuwidth-restarea)/2) * maxspeed
if (window.lefttime) clearTimeout(lefttime)
if (movestate!="right") moveright()
}
else
scrollspeed=0
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function stopmotion(e){
if ((window.event&&!crossmain.contains(event.toElement)) || (e && e.currentTarget && e.currentTarget!= e.relatedTarget && !contains_ns6(e.currentTarget, e.relatedTarget))){
if (window.lefttime) clearTimeout(lefttime)
if (window.righttime) clearTimeout(righttime)
movestate=""
}
}

function fillup(){
if (iedom){
crossmain=document.getElementById? document.getElementById("motioncontainer") : document.all.motioncontainer
menuwidth=parseInt(crossmain.style.width)
mainobjoffset=getposOffset(crossmain, "left")
cross_scroll=document.getElementById? document.getElementById("motiongallery") : document.all.motiongallery
actualwidth=document.all? cross_scroll.offsetWidth : document.getElementById("trueContainer").offsetWidth

crossmain.onmousemove=function(e){
motionengine(e)
}

crossmain.onmouseout=function(e){
stopmotion(e)
showhidediv("hidden")
}
}
loadedyes=1
if (endofgallerymsg!=""){
creatediv()
positiondiv()
}
}






/***********************************************
* CMotion Image Gallery- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for source code
* Last updated Mar 15th, 04'. Added "End of Gallery" message.
* This copyright notice must stay intact for legal use
***********************************************/

var restarea_A=6 //1) width of the "neutral" area in the center of the gallery in px
var maxspeed_A=7 //2) top scroll speed in pixels. Script auto creates a range from 0 to top speed.
var endofgallerymsg_A="<span style='font-size: 11px'>.</span>" 
//3) message to show at end of gallery. Enter "" to disable message.

function enlargeimage_A(path, optWidth, optHeight){ //function to enlarge image. Change as desired.
var actualWidth_A=typeof optWidth!="undefined" ? optWidth : "600px" //set 600px to default width
var actualHeight_A=typeof optHeight!="undefined" ? optHeight : "500px" //set 500px to  default height
var winsttributes_A="width="+actualWidth_A+",height="+actualHeight_A+",resizable=yes"
window.open(path,"", winsttributes_A)
}

////NO NEED TO EDIT BELOW THIS LINE////////////

var iedom_A=document.all||document.getElementById
var scrollspeed_A=0
var movestate_A=""

var actualwidth_A=''
var cross_scroll_A, ns_scroll_A
var loadedyes_A=0

function ietruebody_A(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function creatediv_A(){
statusdiv_A=document.createElement("div")
statusdiv_A.setAttribute("id","statusdiv_A")
document.body.appendChild(statusdiv_A)
statusdiv_A=document.getElementById("statusdiv_A")
statusdiv_A.innerHTML=endofgallerymsg_A
}

function positiondiv_A(){
menuheight_A=parseInt(crossmain_A.offsetHeight)
mainobjoffset_AH_A=getposOffset_A(crossmain_A, "top")
statusdiv_A.style.left=mainobjoffset_A+(menuwidth_A/2)-(statusdiv_A.offsetWidth/2)+"px"
statusdiv_A.style.top=menuheight_A+mainobjoffset_AH_A+"px"
}

function showhidediv_A(what){
if (endofgallerymsg_A!="")
statusdiv_A.style.visibility=what
}

function getposOffset_A(what, offsettype){
var totaloffset_A=(offsettype=="left")? what.offsetLeft: what.offsetTop;
var parentEl_A=what.offsetParent;
while (parentEl_A!=null){
totaloffset_A=(offsettype=="left")? totaloffset_A+parentEl_A.offsetLeft : totaloffset_A+parentEl_A.offsetTop;
parentEl_A=parentEl_A.offsetParent;
}
return totaloffset_A;
}


function moveleft_A(){
if (loadedyes_A){
movestate_A="left"
if (iedom_A&&parseInt(cross_scroll_A.style.left)>(menuwidth_A-actualwidth_A)){
cross_scroll_A.style.left=parseInt(cross_scroll_A.style.left)-scrollspeed_A+"px"
showhidediv_A("hidden")
}
else
showhidediv_A("visible")
}
lefttime_A=setTimeout("moveleft_A()",10)
}

function moveright_A(){
if (loadedyes_A){
movestate_A="right"
if (iedom_A&&parseInt(cross_scroll_A.style.left)<0){
cross_scroll_A.style.left=parseInt(cross_scroll_A.style.left)+scrollspeed_A+"px"
showhidediv_A("hidden")
}
else
showhidediv_A("visible")
}
righttime_A=setTimeout("moveright_A()",10)
}

function motionengine_A(e){
var dsocx_A=(window.pageXOffset)? pageXOffset: ietruebody_A().scrollLeft;
var dsocy_A=(window.pageYOffset)? pageYOffset : ietruebody_A().scrollTop;
var curposy_A=window.event? event.clientX : e.clientX? e.clientX: ""
curposy_A-=mainobjoffset_A-dsocx_A
var leftbound_A=(menuwidth_A-restarea_A)/2
var rightbound_A=(menuwidth_A+restarea_A)/2
if (curposy_A>rightbound_A){
scrollspeed_A=(curposy_A-rightbound_A)/((menuwidth_A-restarea_A)/2) * maxspeed_A
if (window.righttime_A) clearTimeout(righttime_A)
if (movestate_A!="left") moveleft_A()
}
else if (curposy_A<leftbound_A){
scrollspeed_A=(leftbound_A-curposy_A)/((menuwidth_A-restarea_A)/2) * maxspeed_A
if (window.lefttime_A) clearTimeout(lefttime_A)
if (movestate_A!="right") moveright_A()
}
else
scrollspeed_A=0
}

function contains_ns6_A(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function stopmotion_A(e){
if ((window.event&&!crossmain_A.contains(event.toElement)) || (e && e.currentTarget && e.currentTarget!= e.relatedTarget && !contains_ns6_A(e.currentTarget, e.relatedTarget))){
if (window.lefttime_A) clearTimeout(lefttime_A)
if (window.righttime_A) clearTimeout(righttime_A)
movestate_A=""
}
}

function fillup_A(){
if (iedom_A){
crossmain_A=document.getElementById? document.getElementById("motioncontainer_A") : document.all.motioncontainer_A
menuwidth_A=parseInt(crossmain_A.style.width)
mainobjoffset_A=getposOffset_A(crossmain_A, "left")
cross_scroll_A=document.getElementById? document.getElementById("motiongallery_A") : document.all.motiongallery_A
actualwidth_A=document.all? cross_scroll_A.offsetWidth : document.getElementById("trueContainer_A").offsetWidth

crossmain_A.onmousemove=function(e){
motionengine_A(e)
}

crossmain_A.onmouseout=function(e){
stopmotion_A(e)
showhidediv_A("hidden")
}
}
loadedyes_A=1
if (endofgallerymsg_A!=""){
creatediv_A()
positiondiv_A()
}
}

 






/***********************************************
* CMotion Image Gallery- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for source code
* Last updated Mar 15th, 04'. Added "End of Gallery" message.
* This copyright notice must stay intact for legal use
***********************************************/

var restarea_B=6 //1) width of the "neutral" area in the center of the gallery in px
var maxspeed_B=7 //2) top scroll speed in pixels. Script auto creates a range from 0 to top speed.
var endofgallerymsg_B="<span style='font-size: 11px'>.</span>" 
//3) message to show at end of gallery. Enter "" to disable message.

function enlargeimage_B(path, optWidth, optHeight){ //function to enlarge image. Change as desired.
var actualWidth_B=typeof optWidth!="undefined" ? optWidth : "600px" //set 600px to default width
var actualHeight_B=typeof optHeight!="undefined" ? optHeight : "500px" //set 500px to  default height
var winsttributes_B="width="+actualWidth_B+",height="+actualHeight_B+",resizable=yes"
window.open(path,"", winsttributes_B)
}

////NO NEED TO EDIT BELOW THIS LINE////////////

var iedom_B=document.all||document.getElementById
var scrollspeed_B=0
var movestate_B=""

var actualwidth_B=''
var cross_scroll_B, ns_scroll_B
var loadedyes_B=0

function ietruebody_B(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function creatediv_B(){
statusdiv_B=document.createElement("div")
statusdiv_B.setAttribute("id","statusdiv_B")
document.body.appendChild(statusdiv_B)
statusdiv_B=document.getElementById("statusdiv_B")
statusdiv_B.innerHTML=endofgallerymsg_B
}

function positiondiv_B(){
menuheight_B=parseInt(crossmain_B.offsetHeight)
mainobjoffset_BH_B=getposOffset_B(crossmain_B, "top")
statusdiv_B.style.left=mainobjoffset_B+(menuwidth_B/2)-(statusdiv_B.offsetWidth/2)+"px"
statusdiv_B.style.top=menuheight_B+mainobjoffset_BH_B+"px"
}

function showhidediv_B(what){
if (endofgallerymsg_B!="")
statusdiv_B.style.visibility=what
}

function getposOffset_B(what, offsettype){
var totaloffset_B=(offsettype=="left")? what.offsetLeft: what.offsetTop;
var parentEl_B=what.offsetParent;
while (parentEl_B!=null){
totaloffset_B=(offsettype=="left")? totaloffset_B+parentEl_B.offsetLeft : totaloffset_B+parentEl_B.offsetTop;
parentEl_B=parentEl_B.offsetParent;
}
return totaloffset_B;
}


function moveleft_B(){
if (loadedyes_B){
movestate_B="left"
if (iedom_B&&parseInt(cross_scroll_B.style.left)>(menuwidth_B-actualwidth_B)){
cross_scroll_B.style.left=parseInt(cross_scroll_B.style.left)-scrollspeed_B+"px"
showhidediv_B("hidden")
}
else
showhidediv_B("visible")
}
lefttime_B=setTimeout("moveleft_B()",10)
}

function moveright_B(){
if (loadedyes_B){
movestate_B="right"
if (iedom_B&&parseInt(cross_scroll_B.style.left)<0){
cross_scroll_B.style.left=parseInt(cross_scroll_B.style.left)+scrollspeed_B+"px"
showhidediv_B("hidden")
}
else
showhidediv_B("visible")
}
righttime_B=setTimeout("moveright_B()",10)
}

function motionengine_B(e){
var dsocx_B=(window.pageXOffset)? pageXOffset: ietruebody_B().scrollLeft;
var dsocy_B=(window.pageYOffset)? pageYOffset : ietruebody_B().scrollTop;
var curposy_B=window.event? event.clientX : e.clientX? e.clientX: ""
curposy_B-=mainobjoffset_B-dsocx_B
var leftbound_B=(menuwidth_B-restarea_B)/2
var rightbound_B=(menuwidth_B+restarea_B)/2
if (curposy_B>rightbound_B){
scrollspeed_B=(curposy_B-rightbound_B)/((menuwidth_B-restarea_B)/2) * maxspeed_B
if (window.righttime_B) clearTimeout(righttime_B)
if (movestate_B!="left") moveleft_B()
}
else if (curposy_B<leftbound_B){
scrollspeed_B=(leftbound_B-curposy_B)/((menuwidth_B-restarea_B)/2) * maxspeed_B
if (window.lefttime_B) clearTimeout(lefttime_B)
if (movestate_B!="right") moveright_B()
}
else
scrollspeed_B=0
}

function contains_ns6_B(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function stopmotion_B(e){
if ((window.event&&!crossmain_B.contains(event.toElement)) || (e && e.currentTarget && e.currentTarget!= e.relatedTarget && !contains_ns6_B(e.currentTarget, e.relatedTarget))){
if (window.lefttime_B) clearTimeout(lefttime_B)
if (window.righttime_B) clearTimeout(righttime_B)
movestate_B=""
}
}

function fillup_B(){
if (iedom_B){
crossmain_B=document.getElementById? document.getElementById("motioncontainer_B") : document.all.motioncontainer_B
menuwidth_B=parseInt(crossmain_B.style.width)
mainobjoffset_B=getposOffset_B(crossmain_B, "left")
cross_scroll_B=document.getElementById? document.getElementById("motiongallery_B") : document.all.motiongallery_B
actualwidth_B=document.all? cross_scroll_B.offsetWidth : document.getElementById("trueContainer_B").offsetWidth

crossmain_B.onmousemove=function(e){
motionengine_B(e)
}

crossmain_B.onmouseout=function(e){
stopmotion_B(e)
showhidediv_B("hidden")
}
}
loadedyes_B=1
if (endofgallerymsg_B!=""){
creatediv_B()
positiondiv_B()
}
}


