var Ulink_Control={Version:'1.0'}
var tables=[];Ulink_Control.dispose=function(){tables.each(function(i){i.dispose();});tables=null;};Event.observe(window,'unload',Ulink_Control.dispose);Ulink_Control.Table=function(){this.tindex=tables.length;tables[this.tindex]=this;this.wrapPro=null;this.wrapItem=null;this.maxLengths=[];this.keywords=[];this.params=[];this.selectable=[];this.showPages=8;};Ulink_Control.Table.prototype={initialize:function(options){this.options={model:document.getElementById(options.model),target:document.getElementById(options.target),resp:options.response,selectedRowClass:options.selectedRowClass,diselectedRowClass:options.diselectedRowClass,contextMenu:options.contextMenu,arrow_down:options.arrow_down?options.arrow_down:"",arrow_off:options.arrow_off?options.arrow_off:"",arrow_up:options.arrow_up?options.arrow_up:"",pageFunction:options.pageFunction?options.pageFunction:"",emptyMessage:options.emptyMsg?options.emptyMsg:"\u6ca1\u6709\u641c\u7d22\u5230\u8bb0\u5f55"};this.trs=[];this.selectedIndex=[];this.selectStart=-1;this.selectEnd=-1;this.targetTable=document.createElement("table");this.vsu=new Utils.VariableStringUtil("");this.vsu.varPrefix="{";this.vsu.varSuffix="}";this.targetTable.mergeAttributes(this.options.model);this.targetTable.style.display="inline";this.targetTable.setAttribute("tindex",this.tindex);this.initParams();if(this.options.contextMenu){document.body.oncontextmenu=function(){event.returnValue=false;};this.targetTable.onmousedown=this.tableMouseDown;}
this.selectedIndex.splice(0,this.selectedIndex.length);this.trs.splice(0,this.trs.length);},dispose:function(){this.params=this.targetTable=this.dataset=this.options=this.vsu=this.trs=null;},refresh:function(){},build:function(options){this.initialize(options);var page=this.params["currentPage"];if(parseInt(page)<=1){this.params["prePageEvent"]="void(0)";this.params["prePage"]=1;}else{this.params["prePageEvent"]="goToPage("+(parseInt(page)-1)+")";this.params["prePage"]=parseInt(page)-1;}
if(parseInt(page)>=parseInt(this.params["pageCount"])){this.params["nextPageEvent"]="void(0)";this.params["nextPage"]=page;}else{this.params["nextPageEvent"]="goToPage("+(parseInt(page)+1)+")";this.params["nextPage"]=parseInt(page)+1;}
if(this.options.model){var modelRows=this.options.model.rows;for(var m=0;m<modelRows.length;m++){var r=modelRows[m];if(r.getAttribute("type")=="data"){this.createDataRows(r,page);}else if(r.getAttribute("type")=="bar"){this.createBarRow(r);}else if(r.getAttribute("type")=="header"){this.createHeaderRow(r);}else{this.createCommonRows(r);}}}
this.options.target.innerHTML="";this.options.target.appendChild(this.targetTable);},initParams:function(){this.dataset=this.options.resp.body.set;this.params["currentPage"]=this.dataset.segIndex;this.params["totalCount"]=this.dataset.total;this.params["pageSize"]=this.dataset.segSize;this.params["pageCount"]=this.dataset.segCount;this.params["pageBar"]=this.createPageBar(this.dataset,this.options.pageFunction);this.params["checkAllBox"]=this.createCheckAllBox();},createBarRow:function(row){var newRow=this.targetTable.insertRow();newRow.mergeAttributes(row);newRow.setAttribute("tindex",this.tindex);for(var m=0;m<row.cells.length;m++){var newCol=newRow.insertCell();newCol.mergeAttributes(row.cells[m]);newCol.setAttribute("tindex",this.tindex);newCol.innerHTML=replaceWithVariable(row.cells[m].innerHTML,this.vsu.varPrefix,this.vsu.varSuffix,this.params);}},createCommonRows:function(srcRow){var newRow=this.targetTable.insertRow();newRow.mergeAttributes(srcRow);newRow.setAttribute("tindex",this.tindex);for(var m=0;m<srcRow.cells.length;m++){var newCol=newRow.insertCell();newCol.mergeAttributes(srcRow.cells[m]);newCol.setAttribute("tindex",this.tindex);newCol.innerHTML=srcRow.cells[m].innerHTML;}},createEmptyRow:function(srcRow){var newRow=this.targetTable.insertRow();newRow.mergeAttributes(srcRow);newRow.setAttribute("tindex",this.tindex);var newCell=newRow.insertCell();newCell.colSpan=srcRow.cells.length;newCell.mergeAttributes(srcRow.cells[0]);newCell.innerHTML=this.options.emptyMessage;},createHeaderRow:function(row){var newRow=this.targetTable.insertRow();newRow.mergeAttributes(row);newRow.setAttribute("tindex",this.tindex);for(var m=0;m<row.cells.length;m++){var newCol=newRow.insertCell();newCol.mergeAttributes(row.cells[m]);newCol.setAttribute("tindex",this.tindex);newCol.innerHTML=replaceWithVariable(row.cells[m].innerHTML,this.vsu.varPrefix,this.vsu.varSuffix,this.params);}},createDataRows:function(srcRow){if(this.dataset==null||this.dataset==undefined||this.dataset.total==0){this.createEmptyRow(srcRow);return;}
this.dataRowModel=srcRow;var startIndex=0;var endIndex=this.dataset.items.length;for(var m=startIndex;m<endIndex;m++){this.params["row"]=m;var dataRow=this.dataset.items[m];var newRow=this.targetTable.insertRow();newRow.mergeAttributes(srcRow);newRow.setAttribute("row",m);newRow.attachEvent("onclick",this.rowClicked);newRow.attachEvent("ondblclick",this.rowDbClicked);newRow.style.cursor="default";newRow.setAttribute("tindex",this.tindex);var srcCols=srcRow.cells;for(var n=0;n<srcCols.length;n++){var newCol=newRow.insertCell();newCol.mergeAttributes(srcCols[n]);newCol.setAttribute("row",m);newCol.setAttribute("tindex",this.tindex);newCol.innerHTML=srcCols[n].innerHTML;newCol.innerHTML=this.replaceContent(newCol,dataRow,m);}
this.trs[this.trs.length]=newRow;}},updateRow:function(rowIndex,rowData){var row=this.trs[rowIndex];var srcCols=this.dataRowModel.cells;for(var n=0;n<srcCols.length;n++){row.cells[n].innerHTML=this.replaceContent(srcCols[n],rowData,rowIndex);}},replaceContent:function(cell,dataRow,rindex){var str=cell.innerHTML;var newStr="";this.vsu.str=str;this.vsu.reSet();var lastIndex=0;var hasVar=false;while(this.vsu.hasMoreVariables()){hasVar=true;var va=this.vsu.nextVariable();var wrapvalue="";var tmpIndex=va.indexOf("T_");if(tmpIndex==0){wrapvalue=this.getCustomerProperty(va.substring(2,va.length),dataRow,rindex);}else{var property=dataRow.properties[va];if(property!=null){if(this.wrapPro){wrapvalue=this.wrapPro(property,cell);}else{wrapvalue=this.defaultWrapPro(property,cell);}}else{if(this.wrapItem){wrapvalue=this.wrapItem(va,dataRow,cell);}else{wrapvalue=this.defaultWrapItem(va,dataRow,cell);}}
if(wrapvalue==null||wrapvalue==undefined)
wrapvalue="";else if(wrapvalue.substring(0,3)=="<im")
wrapvalue=wrapvalue;else
wrapvalue=this.highLightKeywords(wrapvalue);}
var maxLength=this.maxLengths[va];if(maxLength!=undefined&&maxLength!=null&&maxLength>0){if(wrapvalue.length>maxLength){cell.setAttribute("title",wrapvalue);wrapvalue=wrapvalue.substring(0,maxLength)+"...";}}
newStr+=str.substring(lastIndex,this.vsu.currentStartIndex)
+wrapvalue;lastIndex=this.vsu.currentEndIndex+1;}
if(hasVar)
return newStr+str.substring(lastIndex);else
return str;},highLightKeywords:function(str){if(this.keywords.length==0){return str;}else{for(var i=0;i<this.keywords.length;i++){str=this.highLightKeyword(str,this.keywords[i]);}
return str;}},highLightKeyword:function(str,key){var index=str.indexOf(key);if(index==-1)
return str;if(index==0){return"<span style=\"background-color:#6BB640\"><b>"+key+"</b></span>"+str.substring(index+key.length);}else{return str.substring(0,index)+"<span style=\"background-color:#6BB640\"><b>"+key+"</b></span>"+str.substring(index+key.length);}},defaultWrapPro:function(pro,cell){if(pro.value=="null"||pro.value==null)
return"";if(pro.type!=null&&(pro.type.toLowerCase()=="date"||pro.type.toLowerCase()=="java.util.date")){return pro.value.split(" ")[0];}
return pro.value;},getCustomerProperty:function(va,item,rowIndex){if(va=="checkbox"){this.useCheckBox=true;return this.createCheckBox(rowIndex);}},defaultWrapItem:function(va,item,cell){return"";},getSelectedIndex:function(){return this.selectedIndex;},getSelectedData:function(){var datas=[];for(var i=0;i<this.selectedIndex.length;i++){datas[i]=this.dataset.items[this.selectedIndex[i]];}
return datas;},getSelectedColValue:function(colName){var values=[];for(var i=0;i<this.selectedIndex.length;i++){values[i]=this.dataset.items[this.selectedIndex[i]].properties[colName].value;}
return values;},selectRow:function(rowIndex){var index=indexOf(this.selectedIndex,rowIndex);if(index>=0){this.selectedIndex.splice(index,1);this.trs[rowIndex].setAttribute("className",this.options.diselectedRowClass);}else{if(this.selectable[rowIndex]!=null&&!this.selectable[rowIndex]){return;}
this.selectedIndex[this.selectedIndex.length]=rowIndex;this.trs[rowIndex].setAttribute("className",this.options.selectedRowClass);}},selectAll:function(){this.selectedIndex.splice(0,this.selectedIndex.length);for(var i=0;i<this.trs.length;i++){this.selectRow(i);}},cancelSelect:function(){this.selectedIndex.splice(0,this.selectedIndex.length);for(var i=0;i<this.trs.length;i++){this.selectedIndex[this.selectedIndex.length]=i;this.selectRow(i);}},setMaxLength:function(propertyName,maxLength){this.maxLengths[propertyName]=maxLength;},addKeyword:function(keyword){if(this.keywords.indexOf(keyword)!=-1)
return;this.keywords.push(keyword);},createPageBar:function(set,pageFunction){var pageBarHtml="";if(set.segIndex==1){pageBarHtml+="<img src=\"images/table/firstpage.gif\" style=\"vertical-align:bottom;\" title=\"\u5f53\u524d\u5df2\u8fbe\u9996\u9875\">";}else{pageBarHtml+="<img src=\"images/table/firstpage.gif\" border=\"0\" style=\"cursor:hand;vertical-align:bottom;\" onclick=\""+pageFunction+"(1);\" title=\"\u9996\u9875\">";}
if(set.segIndex>1){pageBarHtml+=" <img src=\"images/table/prepage.gif\" border=\"0\" style=\"cursor:hand;vertical-align:bottom;\" title=\"\u4e0a\u4e00\u9875\" onclick=\""+pageFunction+"("+(parseInt(set.segIndex)-1)+");\">";}else{pageBarHtml+=" <img src=\"images/table/prepage.gif\" border=\"0\" style=\"vertical-align:bottom;\" title=\"\u5f53\u524d\u5df2\u8fbe\u9996\u9875\">";}
if(parseInt(set.segCount)>0){var tmpHtml="";var startPage=set.segIndex-parseInt(this.showPages/2);if(startPage<0)
startPage=1;var endPage=startPage+this.showPages-1;if(endPage>=set.segCount){endPage=set.segCount;startPage=endPage-this.showPages+1;}
for(var i=startPage;i<set.segIndex;i++){if(i<=0)
continue;tmpHtml+=" [<span style=\"cursor:hand;\" onclick=\""+pageFunction+"("+i+")\" title=\"\u8df3\u5230\u7b2c ["+i+"] \u9875\"  onmouseover=\"this.style.cursor='hand';this.style.textDecoration='underline';this.style.color='#F54037';\" onmouseout=\"this.style.textDecoration='none';this.style.color='';\">"+i+"</span>]";}
tmpHtml+=" <span title=\"\u5f53\u524d\u9875\"><b>"+set.segIndex+"</b></span>";for(var i=parseInt(set.segIndex)+1;i<=endPage;i++){if(i<=set.segCount)
tmpHtml+=" [<span style=\"cursor:hand;\" onclick=\""+pageFunction+"("+i+")\" title=\"\u8df3\u5230\u7b2c ["+i+"] \u9875\" onmouseover=\"this.style.cursor='hand';this.style.textDecoration='underline';this.style.color='#F54037';\" onmouseout=\"this.style.textDecoration='none';this.style.color='';\">"+i+"</span>]";}
if(startPage>1)
tmpHtml=" <span style=\"cursor:hand;\" onclick=\""+pageFunction+"("+(startPage-1)+")\" title=\"\u8df3\u5230\u7b2c ["+(parseInt(startPage)-1)+"] \u9875\" onmouseover=\"this.style.cursor='hand';this.style.textDecoration='underline';this.style.color='#F54037';\" onmouseout=\"this.style.textDecoration='none';this.style.color='';\">...</span>"+tmpHtml;if(endPage<set.segCount)
tmpHtml+=" <span style=\"cursor:hand;\" onclick=\""+pageFunction+"("+(parseInt(endPage)+1)+")\" title=\"\u8df3\u5230\u7b2c ["+(parseInt(endPage)+1)+"] \u9875\" onmouseover=\"this.style.cursor='hand';this.style.textDecoration='underline';this.style.color='#F54037';\" onmouseout=\"this.style.textDecoration='none';this.style.color='';\">...</span>";pageBarHtml+=tmpHtml;}
if(set.segIndex==set.segCount||set.segCount==0){pageBarHtml+=" <img src=\"images/table/nextpage.gif\" border=\"0\" style=\"vertical-align:bottom;\" title=\"\u5f53\u524d\u5df2\u8fbe\u6700\u540e\u4e00\u9875\">";}else{pageBarHtml+=" <img src=\"images/table/nextpage.gif\" onclick=\""+pageFunction+"("+(parseInt(set.segIndex)+1)+");\" title=\"\u4e0b\u4e00\u9875\" style=\"cursor:hand;vertical-align:bottom;\" border=\"0\">";}
if(set.segIndex==set.segCount||set.segCount==0){pageBarHtml+=" <img src=\"images/table/lastpage.gif\" border=\"0\" style=\"vertical-align:bottom;\" title=\"\u5f53\u524d\u5df2\u8fbe\u6700\u540e\u4e00\u9875\">";}else{pageBarHtml+=" <img src=\"images/table/lastpage.gif\" onclick=\""+pageFunction+"("+set.segCount+");\" style=\"cursor:hand;vertical-align:bottom;\" title=\"\u5c3e\u9875\">";}
pageBarHtml+="<span style=\"vertical-align:bottom;\">&nbsp;&nbsp;&nbsp;&nbsp;";pageBarHtml+="\u7b2c</span>"+set.segIndex+"<span style=\"vertical-align:bottom;\">\u9875";pageBarHtml+="/\u5171</span>"+set.segCount+"<span style=\"vertical-align:bottom;\">\u9875";pageBarHtml+="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";pageBarHtml+="\u8df3\u8f6c\u5230</span>";pageBarHtml+="<input type='text' id='_table_page_selector_"+tables.length+"' size='1' value=\""+set.segIndex+"\" class=\"lineTextInput\" style=\"width:20px;text-align:center;\" onfocus=\"this.select();\" onclick=\"this.select();\" title=\"\u8bf7\u5728\u8fd9\u91cc\u8f93\u5165\u9875\u7801\" onmouseover=\"this.focus();\">";pageBarHtml+="&nbsp;<img src=\"images/table/go.gif\" border=\"0\" style=\"cursor:hand;\" onclick=\"var pt=$('_table_page_selector_"+tables.length+"');if(pt.value == "+set.segIndex+"){return;}if(parseInt(pt.value) < 1 || parseInt(pt.value) > "+set.segCount+"){alert('\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u9875\u7801 [1 - "+set.segCount+"]');pt.focus();return;}else{"+pageFunction+"(pt.value);}\">";pageBarHtml+="</span>";return pageBarHtml;},createCheckAllBox:function(){return"<input type=\"checkbox\" name=\"checkall_"+this.tindex+"\" table=\""+this.tindex+"\" onclick=\"tables[this.getAttribute('table')].checkAllClicked(this.checked);\">";},createCheckBox:function(rowindex){var dis="";if(this.selectable[rowindex]!=null&&!this.selectable[rowindex]){dis="disabled";}
var ckHtml="<input type=\"checkbox\" name=\"checkbox_"+this.tindex+"\" id=\"checkbox_"+this.tindex+"_"+rowindex+"\" table=\""+this.tindex+"\" row=\""+rowindex+"\" onclick=\"tables[this.getAttribute('table')].checkBoxClicked(this.getAttribute('row'));\""+dis+">";return ckHtml;},checkBoxClicked:function(row){if(row==null||row==undefined)
return;this.selectRow(row);},checkAllClicked:function(checked){if(checked==null||checked==undefined)
return;var allCheckboxs=document.getElementsByName("checkbox_"+this.tindex);for(var i=0;i<allCheckboxs.length;i++){if(allCheckboxs[i].disabled)
continue;allCheckboxs[i].checked=checked;}
if(checked){this.selectAll();}else{this.cancelSelect();}},selectOther:function(){var org=[];for(var i=0;i<this.selectedIndex.length;i++){org[i]=this.selectedIndex[i];}
this.selectAll();for(var i=0;i<org.length;i++){this.selectRow(org[i]);}},tableMouseDown:function(){if(event.button==2){var tindex=event.srcElement.getAttribute("tindex");var table=tables[tindex];table.options.contextMenu.show();var rowIndex=event.srcElement.getAttribute("row");if(rowIndex!=null&&rowIndex!=undefined){if(!table.selectedIndex[rowIndex]){table.rowClicked(event);}}}},rowDbClicked:function(){},rowClicked:function(){var tindex=event.srcElement.getAttribute("tindex");if(tindex==null||tindex==undefined){return;}
var rowIndex=event.srcElement.getAttribute("row");var table=tables[tindex];if(table.useCheckBox)
return;if(event.ctrlKey){table.selectRow(rowIndex);table.selectStart=rowIndex;}else if(event.shiftKey){if(table.selectStart==-1){table.selectRow(rowIndex);table.selectStart=rowIndex;}else{table.cancelSelect();table.selectEnd=rowIndex;if(table.selectStart>=table.selectEnd){for(var i=table.selectEnd;i<=table.selectStart;i++){table.selectRow(i);}}else{for(var i=table.selectStart;i<=table.selectEnd;i++){table.selectRow(i);}}}}else{if(table.selectedIndex.length==1&&table.selectedIndex[0]==rowIndex){table.cancelSelect();table.selectStart=-1;}else{table.cancelSelect();table.selectRow(rowIndex);table.selectStart=rowIndex;}}}}
Ulink_Control.Window=function(){};Ulink_Control.Window.prototype={open:function(options){this.href=options.href;this.target=options.target;this.flag=options.flag;var width=590;var height=340;var left=(screen.width-width)/2;var top=(screen.height-height)/2;this.param+=",toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=yes, status=yes";var parm="";if(this.flag==1)this.param+=',location=1';var win=window.open(this.href,this.target,this.param);}}
Ulink_Control.Calendar=function(textInput){this.textInput=textInput;};Ulink_Control.Calendar.prototype={open:function(options){new calendar();}}
document.write("<div id=\"_ulink_tip_win\" style=\"display:none;zIndex:98;width:200px;height:0;bottom:0;right:0px;position:absolute;background:#F3F8F2;border:1px solid #305A6C;overflow:hidden;\"></div>");function _scroller(){var div=$("_ulink_tip_win");if(div.style.display=="none")
div.style.display="block";div.style.height=parseInt(div.style.height)+2;if(parseInt(div.style.height)>100){setTimeout("_hide()",3000);}else{setTimeout("_scroller()",30);}}
var _should_hide=false;var _on_mouse=false;var _showing=false;function _hide(){if(_on_mouse){_should_hide=true;return;}
_showing=false;_should_hide=false;var div=$("_ulink_tip_win");div.style.height=0;div.style.display="none";}
Ulink_Control.TipWin=function(){};Ulink_Control.TipWin.prototype={show:function(msg){if(_showing)
return;_showing=true;this.div=$("_ulink_tip_win");this.div.innerHTML=msg;_scroller();this.div.onmouseover=this.onmouseover;this.div.onmouseout=this.onmouseout;},onmouseover:function(evt){_on_mouse=true;},onmouseout:function(evt){_on_mouse=false;if(_should_hide){_hide();}}}
Ulink_Control.alert=function(msg){alert(msg);};Ulink_Control.confirm=function(msg){return confirm(msg);};var _ulink_control_scroller_mouse_overs=[];Ulink_Control.Scroller=function(text){this.version="1.01";this.name="Cool Scroller";this.unique=Math.floor(Math.random()*1000000)+"";this.counter=0;this.text=(text)?text:this.version+" "+this.name;this.speed=1;this.height=20;this.width=200;this.boxstyle="border:solid black 0px;"
this.init=function(){this.text+="&nbsp;";document.write('<div id="'+this.unique+'scroller" style="position:relative;width:'+this.width+'px;height:'+this.height+'px;overflow:hidden;'+this.boxstyle+'">');document.write('<div id="'+this.unique+'container" onmouseover="_ulink_control_scroller_mouse_overs[\'scroller_\'+this.id.replace(\'container\',\'\')]=true;" onmouseout="_ulink_control_scroller_mouse_overs[\'scroller_\'+this.id.replace(\'container\',\'\')]=false;" style="position:absolute;color:white;white-space:nowrap;"><table border="0" cellpadding="0" cellspacing="0" id="'+this.unique+'both"><tr><td style="white-space:nowrap;'+this.scrollerstyle+'" id="'+this.unique+'part1"></td><td style="white-space:nowrap;'+this.scrollerstyle+'" id="'+this.unique+'part2"></td></tr></table></div>');document.write('</div>');document.getElementById(this.unique+"part1").innerHTML=this.text;document.getElementById(this.unique+"part2").innerHTML=this.text;this.scrollerWidth=document.getElementById(this.unique+"scroller").offsetWidth;this.scrollerHeight=document.getElementById(this.unique+"scroller").offsetHeight;this.contentWidthReal=this.contentWidth=document.getElementById(this.unique+"part1").offsetWidth;this.contentHeightReal=this.contentHeight=document.getElementById(this.unique+"part1").offsetHeight;if(this.contentWidth<this.scrollerWidth){this.contentWidth=this.scrollerWidth;document.getElementById(this.unique+"part1").style.width=this.scrollerWidth;document.getElementById(this.unique+"part2").style.width=this.scrollerWidth;document.getElementById(this.unique+"both").style.width=this.scrollerWidth*2;}
this.scrollerXpos=0;this.scrollerYpos=0;}
this.setText=function(text){this.text=text+"&nbsp;";document.getElementById(this.unique+"part1").innerHTML=this.text;document.getElementById(this.unique+"part2").innerHTML=this.text;this.scrollerWidth=document.getElementById(this.unique+"scroller").offsetWidth;this.scrollerHeight=document.getElementById(this.unique+"scroller").offsetHeight;this.contentWidthReal=this.contentWidth=document.getElementById(this.unique+"part1").offsetWidth;this.contentHeightReal=this.contentHeight=document.getElementById(this.unique+"part1").offsetHeight;if(this.contentWidth<this.scrollerWidth){this.contentWidth=this.scrollerWidth;document.getElementById(this.unique+"part1").style.width=this.scrollerWidth;document.getElementById(this.unique+"part2").style.width=this.scrollerWidth;document.getElementById(this.unique+"both").style.width=this.scrollerWidth*2;}
this.scrollerXpos=0;this.scrollerYpos=0;}
this.scroll=function(){if(_ulink_control_scroller_mouse_overs["scroller_"+this.unique])
return;this.counter++;if(this.ymod=="sin"){this.scrollerYpos=(Math.sin((2*this.speed*this.counter)*Math.PI/180)*(this.scrollerHeight-this.contentHeight)/2)+(this.scrollerHeight-this.contentHeight)/2;}else if(this.ymod=="bounce"){this.scrollerYpos=this.scrollerHeight-this.contentHeight-(Math.abs(Math.sin((2*this.speed*this.counter)*Math.PI/180))*(this.scrollerHeight-this.contentHeight));}
if(this.xmod=="fixed"){this.scrollerXpos=this.scrollerWidth/2-this.contentWidthReal/2;}else if(this.xmod=="sin"){this.scrollerXpos=(Math.cos((2*this.speed*this.counter)*Math.PI/180)*(this.scrollerWidth-this.contentWidthReal)/2)+(this.scrollerWidth-this.contentWidthReal)/2;}else{this.scrollerXpos-=this.speed;if(this.scrollerXpos<0-this.contentWidth&&this.speed>0){this.scrollerXpos+=this.contentWidth}
if(this.scrollerXpos>0&&this.speed<0){this.scrollerXpos-=this.contentWidth}}
document.getElementById(this.unique+"container").style.left=parseInt(this.scrollerXpos);document.getElementById(this.unique+"container").style.top=parseInt(this.scrollerYpos);}};