function ExpandCollapse(id) 
{
if(id=="plus")
{
document.getElementById('plus').style.display = "block";
document.getElementById('minus').style.display = "none";
}
else
{
document.getElementById('minus').style.display = "block";
document.getElementById('plus').style.display = "none";
}
}
//search st
function searchCheck(){
var str=''
if(document.frm.ss.value=='' || document.frm.ss.value=='Search Products/Services'){
alert("Please enter some keyword to search.")
document.frm.ss.focus()
document.frm.ss.value=''
return false}
if(document.frm.ss.value.length<3){
alert("Please Enter atleast 3 character")
document.frm.ss.focus()
return false}
if(document.frm.ss.value){
var str1
str1=document.frm.ss.value.replace(/^\s+/g,'').replace(/\s+$/g,'')
str1=str1.replace(/[^a-zA-Z0-9+]/g,' ')
str1=str1.replace(/\+/g,' ')
str1=str1.replace(/\s+/g,'+')
str+='ss='+str1
window.location = "http://www.fixrivet.com/search.html?"+str;
return false}}
function searchClear(){
if(document.frm.ss.value=='Search Products/Services'){
document.frm.ss.value=''}}
function settext(){
if(document.frm.ss.value==''){
document.frm.ss.value='Search Products/Services'}}
function settextvalue(){
document.frm.ss.value='Search Products/Services'}
function getDwsCookie(Name){
var search=Name+"="
if(document.cookie.length>0){
offset=document.cookie.indexOf(search)
if(offset !=-1){
offset+=search.length
end=document.cookie.indexOf(";",offset)
if(end==-1)end=document.cookie.length
return unescape(document.cookie.substring(offset,end))}}
return ""}
function setDwsCookie(name,value){
expires=new Date()
expires.setTime(expires.getTime()+24*60*60*150*1000)
if(value.length>0)
document.cookie=name+"="+escape(value)+";"+"expires="+expires.toGMTString()+";"}
function showTradeOfferLink(){
if((cookie=getDwsCookie("ETO_OFFERS"))>""){
if(cookie !=""){
document.write('&nbsp;|&nbsp;<a href="latesttradeoffer.html">Trade Offers ('+cookie+')</a>')}}
else{
var surl="http://www.media4trade.com/tradeofferserver?id=235528&setcookie=1&disp=link"
document.write('<scr'+'ipt language="javascript"'+' src="'+surl+'"></scr'+'ipt>')}}
function showTradeOfferLink1(){
if((cookie=getDwsCookie("ETO_OFFERS"))>""){
if(cookie !=""){
document.write('<LI><B><a href="latesttradeoffer.html">Trade Offers ('+cookie+')</a></B></LI>')}}
else{
var surl="http://www.media4trade.com/tradeofferserver?id=579072&setcookie=1&disp=link"
document.write('<scr'+'ipt language="javascript"'+' src="'+surl+'"></scr'+'ipt>')}}
function showTradeOfferLink2(){
document.write('&nbsp;|&nbsp;<a href="latesttradeoffer.html">Trade Offers</a>');}
function showTradeOfferCount(){
if((cookie=getDwsCookie("ETO_OFFERS"))>""){
if(cookie !=""){
document.write(' ('+cookie+')')}}}
function showTradeOfferLink3(){
if((cookie=getDwsCookie("ETO_OFFERS"))>""){
if(cookie !=""){
document.write('<LI><B><a href="latesttradeoffer.html">Trade Offers ('+cookie+')</a></B></LI>')}}
else{
var surl="http://www.media4trade.com/tradeofferserver?id=235528&setcookie=1&disp=link"
document.write('<scr'+'ipt language="javascript"'+' src="'+surl+'"></scr'+'ipt>')}}
//search end
/*-plus-ninus */
// show and hide product name on home page

var plnew = "pl2";
function show(obj, plus, obj1,plus1)
{
if(document.getElementById)
{
var el = document.getElementById(obj);
var ar = document.getElementById("ms1").getElementsByTagName("div");
for (var i=0; i<ar.length; i++)
{
if(ar[i].className == "on")
{
ar[i].className = "off";
}
}
document.getElementById(obj).className = "on";
}
if(document.getElementById(plnew))
{
document.getElementById(plnew).className = "prd lh2 c6 a b bo7 p9 cu";
}
if(document.getElementById(plus).className == "prd lh2 c6 a b bo7 p9 cu")
{
document.getElementById(plus).className = "pr1 lh2 c6 a b p9";
}
plnew = plus;
document.getElementById(obj1).className = "off";
document.getElementById(plus1).className = "b f2 u c5 txr p10 w5";
}
function show1(obj, plus)
{
document.getElementById(obj).className = "on";
document.getElementById(plus).className = "off";
}
function show2(obj, plus)
{
document.getElementById(obj).className = "b f2 u c5 txr p10 w5";
document.getElementById(plus).className = "off";
}
/*-plus-ninus:end */

//language st
browserName=navigator.appName
browserVer=parseInt(navigator.appVersion)
condition=!(((browserName.indexOf("Explorer")>=0)&&(browserVer<4))||((browserName.indexOf("Netscape")>=0)&&(browserVer<2)))
if(condition==true)
CanAnimate=true
else
CanAnimate=false
function convertnew(pattern){
var open_in_same_window=0
var my_location=unescape(document.location.toString())
var new_location=''
var new_pattern=''
if(my_location.indexOf('translate_c?')!=-1){
var indexof_u=my_location.indexOf('u=')
if(indexof_u==-1){
new_location=document.location}
else{
var subs=my_location.substring(indexof_u,my_location.length)
var ss=subs.split('&')
new_location=ss[0].substring(2,ss[0].length)
}}
else{
new_location=document.location}
indexof_p=pattern.indexOf('|')
var isen=''
if(indexof_p==-1){
indexof_p1=pattern.indexOf('><')
if(indexof_p1==-1){
new_pattern=pattern
if(pattern=='en'){
isen=1
}}
else{
var psplit=pattern.split('><')
new_pattern=psplit[0]+'|'+psplit[1]
if(psplit[1]=='en'){
isen=1
}}}
else{
var psplit=pattern.split('|')
new_pattern=psplit[0]+'|'+psplit[1]
if(psplit[1]=='en'){
isen=1
}}
var thisurl=''
if(isen==1){
thisurl=new_location}
else{
thisurl='http://translate.google.com/translate_c?langpair='+new_pattern+"&u="+new_location}
if(open_in_same_window==1){
window.location.href=thisurl}
else{
if(CanAnimate){
msgWindow=window.open('','subwindow','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0')
msgWindow.focus()
msgWindow.location.href=thisurl}
else{
msgWindow=window.open(thisurl,'subwindow','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0')
}}}
//language end
//vedeo st
var win=null

function SwitchMenu3(obj){
if(document.getElementById){
var el = document.getElementById(obj);
var ar = document.getElementById("masterdiv3").getElementsByTagName("table");
if(el.style.display != "block"){
for (var i=0; i<ar.length; i++){
if (ar[i].className=="sub1")
ar[i].style.display = "none";
}
el.style.display = "block";}
else{
el.style.display = "none";
}}}


function hot()
{
document.getElementById('htb').className="don";
document.getElementById('ln').className="doff";

document.getElementById('h').className="b fl k1 w-5 ta c11";
document.getElementById('l').className="b fl w-5 cu bg4 ta k1 c10";

document.getElementById('foroffer').style.display="block";
document.getElementById('forlaunch').style.display="none";
}

function newlaunch()
{
document.getElementById('htb').className="doff";
document.getElementById('ln').className="don";


document.getElementById('h').className="b fl w-5 cu bg4 ta k1 c10";
document.getElementById('l').className="b fl k1 w-5 ta c11";

document.getElementById('foroffer').style.display="none";
document.getElementById('forlaunch').style.display="block";
}

var testnew =0;
var test =1;
function nexthot()
{
test++;
if (document.getElementById('hot'+test))
{
document.getElementById('hot'+test).className="don";
var testnew = test - 1;
document.getElementById('hot'+testnew).className="doff";
}
else
{
test--;
}}
function prehot()
{
if (document.getElementById('hot'+test) && test > 1)
{
test--;
document.getElementById('hot'+test).className="don";
var testnew = test+1;
document.getElementById('hot'+testnew).className="doff";
}}

var launchnew =0;
var launch =1;

function nextlan()
{
launch++;
if (document.getElementById('launch'+launch))
{
document.getElementById('launch'+launch).className="don";
var launchnew = launch - 1;
document.getElementById('launch'+launchnew).className="doff";
}
else
{
launch--;
}}

function prelan()
{
if (document.getElementById('launch'+launch) && launch > 1)
{
launch--;
document.getElementById('launch'+launch).className="don";
var launchnew = launch+1;
document.getElementById('launch'+launchnew).className="doff";
}}

function tst(d) 
{ 
if(d=="t1")
{
document.getElementById('t1').style.display = "block";
document.getElementById('t2').style.display = "none";
}
else
{
document.getElementById('t2').style.display = "block";
document.getElementById('t1').style.display = "none";
}}

//-----starting of new js part to open all blowup from a single js-----------------
var myWidthnew=0, myHeightnew=0;
var divscroll,message2,prname,imagediv,blwtbl,mx,mx1;
function bhw_js(val){
if( typeof( window.innerWidth )=='number' ){myWidthnew=window.innerWidth;myHeightnew=window.innerHeight;} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {myWidthnew=document.documentElement.clientWidth;myHeightnew=document.documentElement.clientHeight;} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {myWidthnew=document.body.clientWidth;myHeightnew=document.body.clientHeight;}var h=window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;var browserName=navigator.appName; var imagedivheight=myHeightnew-93;var test=myWidthnew*24/100;var divwidth=myWidthnew-test;var widthformizilla=myWidthnew-538;var mozillawidth=widthformizilla-divwidth;var mozillawidth1=mozillawidth/2;var mtop=h+7;var iewidth=myWidthnew-516;var aboveheight=myHeightnew-584;if (val=="cal"){iewidth=myWidthnew-730;aboveheight=myHeightnew-410;}var iewidth1=iewidth/2;var aboveheight1=aboveheight/2+h;divscroll.style.height="500px";divscroll.style.width="504px";blwtbl.style.height="478px";if (val=="cal"){blwtbl.style.height="320px";divscroll.style.width='730px';divscroll.style.height='335px';}message2.style.top=aboveheight1+'px';message2.style.left=iewidth1+'px';divscroll.name="miniwin";if ((myHeightnew <=586) && (val !="cal")){divscroll.style.height=imagedivheight+'px';divscroll.style.width="522px";blwtbl.style.height=imagedivheight+'px';message2.style.top=mtop+'px';}}function max(){var imagedivheightnew=myHeightnew-93;var imagedivwidthnew=myWidthnew-212;var imagedivheightnew1=myHeightnew-94;var h=window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;var browserName=navigator.appName; var mtop=h+7;if (divscroll.name=="miniwin"){message2.style.left="100px";message2.style.top=mtop+'px';divscroll.style.width=imagedivwidthnew+'px';divscroll.style.height=imagedivheightnew+'px';blwtbl.style.height=imagedivheightnew1+'px';divscroll.name="maxwin";mx.className="doff ";mx1.className="don blow b2";}else{mx.className="don blow bol";mx1.className="doff";bhw_js()}}
function blowup_show_js(){fll();divscroll=document.getElementById('divscroll');message2=document.getElementById('message2');prname=document.getElementById('prname');imagediv=document.getElementById('imagediv');blwtbl=document.getElementById('blwtbl');mx=document.getElementById('mx');mx1=document.getElementById('mx1');divscroll.style.height="";divscroll.style.width=""; var nAgt=navigator.userAgent;var patt=/Chrome/;if(patt.test(nAgt)){}else if(navigator.appName == 'Microsoft Internet Explorer'){document.getElementsByTagName("html")[0].style.overflow="hidden";}else{document.body.style.overflow="hidden";}message2.className="don";mx.className="don blow bol";mx1.className="doff";bhw_js();}
function blowup_show2(){divscroll=document.getElementById('divscroll');message2=document.getElementById('message2');prname=document.getElementById('prname');imagediv=document.getElementById('imagediv');blwtbl=document.getElementById('blwtbl');mx=document.getElementById('mx');mx1=document.getElementById('mx1');divscroll.style.height="";divscroll.style.width="";mx.className="doff";mx1.className="doff"; var nAgt=navigator.userAgent;var patt=/Chrome/;if(patt.test(nAgt)){message2.className="don";bhw_js('cal');}else{document.body.style.overflow="hidden";document.getElementsByTagName("html")[0].style.overflow="hidden";message2.className="don";bhw_js('cal');}}function blowup_off_js(){message2.className="doff";document.body.style.overflow="";document.getElementsByTagName("html")[0].style.overflow="";}var path='';var imgid="0";function imageset(id,imagepath){divscroll=document.getElementById('divscroll');message2=document.getElementById('message2');prname=document.getElementById('prname');imagediv=document.getElementById('imagediv');blwtbl=document.getElementById('blwtbl');mx=document.getElementById('mx');mx1=document.getElementById('mx1');path=imagepath;imgid=id;var pic=document.getElementById(imgid);productName=pic.alt;productName=unescape(productName);if(productName.length > 40){var c=productName.substring(0,40);c=c + "...";productName=c;}var nAgt=navigator.userAgent; var patt=/Opera/; if(patt.test(nAgt)) { imagediv.className="don"; document.getElementById('loadimg').className="doff"; }imagediv.innerHTML='<img src="'+path+'"   alt="'+productName+'" onload="loadimg()" id="bigimg">';prname.innerHTML=productName;}
function trustseal(path){imagediv.innerHTML='<iframe src="'+path+'"   height="830" width="520" onload="loadimg1();" id="ifrm" FRAMEBORDER="0" MARGINWIDTH="0"></iframe>';divscroll.style.width='550px';blwtbl.style.height="600px";mx.className="doff";mx1.className="doff";}

function callfree1(glusr_id,modid)
{if(glusr_id !='' && modid != ''){var url = '/cgi/datetime.pl?supId='+glusr_id+'&modid='+modid;http_request = false;if(window.XMLHttpRequest){http_request = new XMLHttpRequest();if(http_request.overrideMimeType){http_request.overrideMimeType('text/html');}}else if(window.ActiveXObject){try
{http_request = new ActiveXObject("Msxml2.XMLHTTP");}catch (e){try{http_request = new ActiveXObject("Microsoft.XMLHTTP");}catch (e){}}}http_request.onreadystatechange = function() {alertContents(http_request); };http_request.open('GET', url, true);http_request.send(null);}else{alert('There is some technical problem.Please try after some time.');}}
function alertContents(http_request)
{if (http_request.readyState == 4)
{if (http_request.status == 200){var my_result = http_request.responseText;if(my_result == 1)
{alert('There is some technical problem.Please try after some time.');}else
{var strarr = my_result.split("##");comp_nm = strarr[1];comp_nm = comp_nm.replace(/\\'/g,"'");comp_nm = escape(comp_nm);comp_nm='&supCompName='+comp_nm;callpath= strarr[0]+comp_nm;document.getElementById('imagediv').innerHTML='<iframe src="'+callpath+'"   height = "320" width = "718" onload="loadimg1()" FRAMEBORDER="0" MARGINWIDTH="0" SCROLLING="no"></iframe>';document.getElementById('divscroll').style.width='730px';document.getElementById('divscroll').style.height='335px';}}}}

function loadimg(){document.getElementById('loadimg').className="doff";imagediv.className="don";if(document.getElementById('bigimg').height > 500 || document.getElementById('bigimg').width > 500){max();}}
function loadimg1(){document.getElementById('loadimg').className="doff";imagediv.className="don";}document.write('<DIV ID="message2" STYLE="position:absolute;top:0px;left:0px;z-index:2000";ALIGN="center" class="doff"><table ID="tableheight" ALIGN="center" BORDER="0" CELLPADDING="0" CELLSPACING="0"><tr><TD ALIGN="center"><table CLASS="bgclor" BORDER="0" CELLPADDING="0" CELLSPACING="0"><tr><TD ALIGN="center"><table CLASS="blow main" ALIGN="center" BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%" HEIGHT="35"><tr><TD ID="titleBar"STYLE="cursor:move"><ILAYER WIDTH="100%" ONSELECTSTART="return false"> </ILAYER><layer WIDTH="100%" ONMOUSEOVER="isHot=true;if (isN4) ddN4(message2)" ONMOUSEOUT="isHot=false"><DIV ID="prname" CLASS="pr-txt"></DIV></LAYER></TD><TD ALIGN="right" STYLE="padding-right:0px;" WIDTH="100"><table BORDER="0" CELLPADDING="0" CELLSPACING="0"><tr><TD><img src="ts/zero.gif"  id="mx" WIDTH="21" HEIGHT="21" STYLE="cursor:pointer" ONCLICK="max()" HSPACE="2" class="don blow bol" title="Maximize"></TD><TD><img src="ts/zero.gif"    id="mx1" WIDTH="21" HEIGHT="21" STYLE="cursor:pointer;" class="doff" ONCLICK="max()" HSPACE="2" title="Restore"></TD><TD><img src="ts/zero.gif"   WIDTH="21" HEIGHT="21" hspace="3" ONCLICK="blowup_off_js()" class="blow clos" STYLE="cursor:pointer" title="Close"></TD></tr></table></TD></tr></table><DIV CLASS="image_div" ID="divscroll" ALIGN="center"><table ID="blwtbl" ALIGN="center" BGCOLOR="#ffffff" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><tr><TD ALIGN="center"><DIV ID="loadimg" STYLE="font-family:arial;font-size:15px;" class="doon"><img src="ts/indicator-new.gif"    height="36" width="36"><BR><BR>Loading...</DIV><DIV ID="imagediv" class="doff"></DIV></TD></tr></table></DIV></TD></tr></table></TD></tr></table></DIV>');
isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;
function ddInit(e){
topDog=isIE ? "BODY" : "HTML";
whichDog=isIE ? document.all.message2 : document.getElementById("message2");
hotDog=isIE ? event.srcElement : e.target;
while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;}
if (hotDog.id=="titleBar"){
offsetx=isIE ? event.clientX : e.clientX;
offsety=isIE ? event.clientY : e.clientY;
nowX=parseInt(whichDog.style.left);
nowY=parseInt(whichDog.style.top);
ddEnabled=true;
document.onmousemove=dd;}}
function dd(e){
if (!ddEnabled) return;
whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx+'px';
whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety+'px';
return false;}
function ddN4(whatDog){
if (!isN4) return;
N4=eval(whatDog);
N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
N4.onmousedown=function(e){
N4.captureEvents(Event.MOUSEMOVE);
N4x=e.x;
N4y=e.y;}
N4.onmousemove=function(e){
if (isHot){
N4.moveBy(e.x-N4x,e.y-N4y);
return false;}}
N4.onmouseup=function(){
N4.releaseEvents(Event.MOUSEMOVE);}}
function hideMe(){
if (isIE||isNN) whichDog.style.visibility="hidden";
else if (isN4) document.message2.visibility="hide";}
function showMe(){
if (isIE||isNN) whichDog.style.visibility="visible";
else if (isN4) document.message2.visibility="show";}
function fll()
{
document.body.onmousedown=ddInit;
}
document.onmouseup=Function("ddEnabled=false");
function keyDown(e, trace){if (trace=="home"){
var n=(window.Event) ? e.which : e.keyCode;if(n==9 && 
document.getElementById('message2').className=="don"){return false;}else 
if(n==32 && document.getElementById('message2').className=="don"){return 
false;}
else if(n==27 && 
document.getElementById('message2').className=="don"){blowup_off_js();}}
else{var n=(window.Event) ? e.which : e.keyCode;if(n==9 && 
p_blo.className=="don"){return false;}else if(n==32 && 
p_blo.className=="don"){return false;}else if(n==27 && 
p_blo.className=="don"){blowup_hide();}if((n==37 && 
p_blo.className=="don") || (n==38 && p_blo.className=="don")){if 
(imgid==1){return false;}previousimg();}else if((n==39 && 
p_blo.className=="don") || (n==40 && p_blo.className=="don")){if 
(imgid==dataref1.length){return false;}
nextimg();return false;}}}
var persistmenu="yes"
var persisttype="sitewide"
if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('.tog{display: none;}\n')
document.write('.tbq{display: none;}\n')
document.write('.sub1{display: none;}\n')
document.write('</style>\n')
}
function SwitchMenu2(obj){
if(document.getElementById){
var el = document.getElementById(obj);
var ar = document.getElementById("masterdiv2").getElementsByTagName("div");
if(el.style.display != "block"){
for (var i=0; i<ar.length; i++){
if (ar[i].className=="sub1")
ar[i].style.display = "none";
}
el.style.display = "block";}
else{
el.style.display = "none";
}}}
var testnew =0;var test =1;
function nextcme(){test++;
if (document.getElementById('cme'+test)){
document.getElementById('cme'+test).className="don";
var testnew = test - 1;
document.getElementById('cme'+testnew).className="doff";
}else{test--;}}
function precme()
{if (document.getElementById('cme'+test) && test > 1)
{test--;
document.getElementById('cme'+test).className="don";
var testnew = test+1;
document.getElementById('cme'+testnew).className="doff";
}}
function ddtabcontent(tabinterfaceid){
this.tabinterfaceid=tabinterfaceid
this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a")
this.enabletabpersistence=true
this.hottabspositions=[]
this.currentTabIndex=0
this.subcontentids=[]
this.revcontentids=[]
this.selectedClassTarget="link"
}
ddtabcontent.getCookie=function(Name){ 
var re=new RegExp(Name+"=[^;]+", "i");
if (document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1]
return ""
}
ddtabcontent.setCookie=function(name, value){
document.cookie = name+"="+value+";path=/"
}
ddtabcontent.prototype={
expandit:function(tabid_or_position){
this.cancelautorun()
var tabref=""
try{
if (typeof tabid_or_position=="string" && document.getElementById(tabid_or_position).getAttribute("rel"))
tabref=document.getElementById(tabid_or_position)
else if (parseInt(tabid_or_position)!=NaN && this.tabs[tabid_or_position].getAttribute("rel"))
tabref=this.tabs[tabid_or_position]
}
catch(err){alert("Invalid Tab ID or position entered!")}
if (tabref!="")
this.expandtab(tabref)
},

cycleit:function(dir, autorun){
if (dir=="next"){
var currentTabIndex=(this.currentTabIndex<this.hottabspositions.length-1)? this.currentTabIndex+1 : 0
}
else if (dir=="prev"){
var currentTabIndex=(this.currentTabIndex>0)? this.currentTabIndex-1 : this.hottabspositions.length-1
}
if (typeof autorun=="undefined")
this.cancelautorun()
this.expandtab(this.tabs[this.hottabspositions[currentTabIndex]])
},

setpersist:function(bool){
this.enabletabpersistence=bool
},

setselectedClassTarget:function(objstr){
this.selectedClassTarget=objstr || "link"
},

getselectedClassTarget:function(tabref){
return (this.selectedClassTarget==("linkparent".toLowerCase()))? tabref.parentNode : tabref
},

urlparamselect:function(tabinterfaceid){
var result=window.location.search.match(new RegExp(tabinterfaceid+"=(\\d+)", "i"))
return (result==null)? null : parseInt(RegExp.$1)
},

expandtab:function(tabref){
var subcontentid=tabref.getAttribute("rel")
var associatedrevids=(tabref.getAttribute("rev"))? ","+tabref.getAttribute("rev").replace(/\s+/, "")+"," : ""
this.expandsubcontent(subcontentid)
this.expandrevcontent(associatedrevids)
for (var i=0; i<this.tabs.length; i++){
this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==subcontentid)? "selected" : ""
}
if (this.enabletabpersistence)
ddtabcontent.setCookie(this.tabinterfaceid, tabref.tabposition)
this.setcurrenttabindex(tabref.tabposition)
},

expandsubcontent:function(subcontentid){
for (var i=0; i<this.subcontentids.length; i++){
var subcontent=document.getElementById(this.subcontentids[i])
subcontent.style.display=(subcontent.id==subcontentid)? "block" : "none"
}
},

expandrevcontent:function(associatedrevids){
var allrevids=this.revcontentids
for (var i=0; i<allrevids.length; i++){
document.getElementById(allrevids[i]).style.display=(associatedrevids.indexOf(","+allrevids[i]+",")!=-1)? "block" : "none"
}
},
setcurrenttabindex:function(tabposition){
for (var i=0; i<this.hottabspositions.length; i++){
if (tabposition==this.hottabspositions[i]){
this.currentTabIndex=i
break
}
}
},

autorun:function(){
this.cycleit('next', true)
},

cancelautorun:function(){
if (typeof this.autoruntimer!="undefined")
clearInterval(this.autoruntimer)
},

init:function(automodeperiod){
var persistedtab=ddtabcontent.getCookie(this.tabinterfaceid)
var selectedtab=-1
var selectedtabfromurl=this.urlparamselect(this.tabinterfaceid)
this.automodeperiod=automodeperiod || 0
for (var i=0; i<this.tabs.length; i++){
this.tabs[i].tabposition=i
if (this.tabs[i].getAttribute("rel")){
var tabinstance=this
this.hottabspositions[this.hottabspositions.length]=i
this.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel")
this.tabs[i].onclick=function(){
tabinstance.expandtab(this)
tabinstance.cancelautorun()
return false
}
if (this.tabs[i].getAttribute("rev")){
this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/))
}
if (selectedtabfromurl==i || this.enabletabpersistence && selectedtab==-1 && parseInt(persistedtab)==i || !this.enabletabpersistence && selectedtab==-1 && this.getselectedClassTarget(this.tabs[i]).className=="selected"){
selectedtab=i
}}}if (selectedtab!=-1)
this.expandtab(this.tabs[selectedtab])
else
this.expandtab(this.tabs[this.hottabspositions[0]])
if (parseInt(this.automodeperiod)>500 && this.hottabspositions.length>1){
this.autoruntimer=setInterval(function(){tabinstance.autorun()}, this.automodeperiod)
}}}
var testnew =0;var test =1;
function nextcmtr(){test++;
if (document.getElementById('cmtr'+test)){
document.getElementById('cmtr'+test).className="don";
var testnew = test - 1;
document.getElementById('cmtr'+testnew).className="doff";
}else{test--;}}
function precmtr()
{if (document.getElementById('cmtr'+test) && test > 1)
{test--;
document.getElementById('cmtr'+test).className="don";
var testnew = test+1;
document.getElementById('cmtr'+testnew).className="doff";
}}

var testnew =0;var test =1;
function nextotd(){test++;
if (document.getElementById('otd'+test)){
document.getElementById('otd'+test).className="don";
var testnew = test - 1;
document.getElementById('otd'+testnew).className="doff";
}else{test--;}}
function preotd()
{if (document.getElementById('otd'+test) && test > 1)
{test--;
document.getElementById('otd'+test).className="don";
var testnew = test+1;
document.getElementById('otd'+testnew).className="doff";
}}
//dynamiclayout effect start
