var plugin
var main
var stage_width

function makeScrollBars (s, canvasName, xpos, ypos, xheight, yheight, verticalOrHorizontal, XAMLelement, XAMLHeight) {

//Width="308" Height="222" x="564" y="204"
//makeScrollBars(sender, "scrollcanvas" + cat , 504, 204, 294, 232, "v", sendXAML);

main=s.findName("scrollcanvas")
plugin = s.getHost()

//unique name, xpos, ypos, width, height, dir, text, bg_color
spObj=new createScrollablePanel(canvasName,xpos,ypos,xheight,yheight,verticalOrHorizontal,XAMLelement,XAMLHeight, null)
}

function scrollcanvasMouseLeave(s) {
this.mouse_down=0
clearInterval(mouseCheckInt)
s.releaseMouseCapture()
}

function btnDown(s) {

var index=s.name.split("_")[2]
var which_scrollpanel=s.name.split("_")[1]
updateText("sp"+which_scrollpanel,textArr[index])		
}

