
var persistmenu="yes"
var persisttype="sitewide"
if(document.getElementById){
document.write('<style type="text/css">\n')
document.write('.sub{display: none;}\n')
document.write('.tog{display: none;}\n')
document.write('.sub1{display: none;}\n')
document.write('.tbq{display: none;}\n')
document.write('</style>\n')}
function SwitchMenu(obj){
if(document.getElementById){
var el=document.getElementById(obj)
if(el.style.display !="inline"){
for(var i=0;i<ar.length;i++){
if(ar[i].className=="tbq")
ar[i].style.display="none"}
el.style.display="inline"}}}
function SwitchMenu1(obj){
if(document.getElementById){
var el=document.getElementById(obj)
var ar=document.getElementById("mas").getElementsByTagName("div")
if(el.style.display !="block"){
for(var i=0;i<ar.length;i++){
if(ar[i].className=="tog")
ar[i].style.display="none"}
el.style.display="block";}
else{
el.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://bhpsample.mypcat.com/d0007_blue-teal-white-1_plant-machinery/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 Offer ('+cookie+')</a>')}}
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 showTradeOfferLink1(){
if((cookie=getDwsCookie("ETO_OFFERS"))>""){
if(cookie !=""){
document.write('<a href="latesttradeoffer.html">Trade Offer ('+cookie+')</a>')}}
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 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 Offer ('+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>')}}

//search end

/*-plus-ninus */
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 pi9 cu";
}
if(document.getElementById(plus).className == "prd lh2 c6 a b bo7 pi9 cu")
{
document.getElementById(plus).className = "pr1 lh2 b c6 a b pi9";
}
plnew = plus;
document.getElementById(obj1).className = "off";
document.getElementById(plus1).className = "b f1 u c17 txr";
}
function show1(obj, plus)
{
document.getElementById(obj).className = "on";
document.getElementById(plus).className = "off";
}
function show2(obj, plus)
{
document.getElementById(obj).className = "b f1 u c17 txr";
document.getElementById(plus).className = "off";
}
/*-plus-ninus:end */










//manu st
var ver='3.0.1D'
var m1=new Object
m1.name='m1'
m1.fnm='submenu-top-nav-m2'
if(!window.lastm||window.lastm<1)lastm=1
m1.v17=null
m1.v17Timeout=''
var maxZ=1000
m1.v18
m1.targetFrame
var docLoaded=false
m1.bIncBorder=true
m1.v29=null
m1.v29Str=''
m1.v55=50
m1.scrollStep=10
m1.fadingSteps=2
m1.itemOverDelay=0
m1.transTLO=0
m1.fixSB=0
m1.v21="."
m1.maxlev=2
m1.v22=0
m1.sepH=10
m1.bHlNL=1
m1.showA=1
m1.bVarWidth=0
m1.bShowDel=50
m1.scrDel=0
m1.v23=200

m1.levelOffset=-1
m1.levelOffsety=2
m1.bord=1
m1.vertSpace=8
m1.sep=1
m1.v19=false
m1.bkv=0
m1.rev=0
m1.shs=0
m1.xOff=1
m1.yOff=0
m1.v20=false
m1.cntFrame=""
m1.menuFrame=""
m1.v24=""
m1.mout=true
m1.iconSize=10
m1.closeDelay=100
m1.v25=false
m1.v52=false
m1.v60=0
m1.v11=false
m1.v10=0
m1.ppLeftPad=1
m1.v54=0
m1.v01=2
m1.menuHorizontal=true
m1.scrollHeight=6
overflow="scroll";
m1mn2=new Array
m1mn1=new Array
(
"The Event","Aboutus.aspx",0,"","",
"The Organisers","TheOrganisers.aspx",0,"","",
"India's Defence Industry","IndiaDefIndustry.aspx",0,"","",
"How To Reach","HowtoReach.aspx",0,"","",
"Venue &amp; Timings","VenueTimings.aspx",0,"","",
"Aero India","AboutusAeroindia.aspx",0,"",""
)
m1mn6=new Array
(
"Registration","CompanyRegistrationInfo.aspx",0,"","",
"Exhibitor Zone","login.aspx",0,"","",
"Exhibitor Profile","exhibitorProfile.aspx",0,"","",
"In Retrospect - Defexpo'10","retrospect.aspx",0,"","",
"Stand &amp; Packages","SpaceRental.aspx",0,"","",
"Layout Plan","login.aspx",0,"","",
"Official Contractors","OfficialContractor.aspx",0,"","",
"Branding Opportunities", "BrandingLocations.aspx", 0, "", "",
"Sponsorship Opportunities","SponsorshipOpportunities.aspx",0,"","",
"Advertisement Opportunities - Non Exhibitors","AdvertisementOpportunitiesNonExhibitors.aspx",0,"","",
"Download Brochure - Defexpo 2012","Defexpo_Brochure.pdf",0,"","",
"Exhibiting Companies","login.aspx",0,"",""
)
m1mn7=new Array
(
"Conference Overview", "ConferenceOverview.aspx", 0, "", "",
"Why Attend?","ComingSoon.aspx",0,"","",
"Agenda", "Agenda.aspx", 0, "", "",
"Delegate Registration", "DelegateIntropage.aspx", 0, "", "",
"Delegate Login", "DelegateLogin.aspx", 0, "", ""
)
m1mn8=new Array
(
"Defexpo 2012 Officials (Registration)","OfficialRegistration.aspx",0,"","",
"Business Visitor Registration","BusinessVisitorLandingPage.aspx",0,"","",
"General Visitor Registration","GeneralPublic.aspx",0,"","",
"Admission Policy","AdmissionPolicy.aspx",0,"",""

)
m1mn9=new Array
(
"About India","AboutIndia.aspx",0,"","",
"About New Delhi","AboutNewDelhi.aspx",0,"","",
"Official Travel Agent","OfficialTravelPartner.aspx",0,"","",
"Accommodation","accommodation.aspx",0,"","",
"Visa Information","VisaInformation.aspx",0,"",""
)

m1mn10=new Array
(
"Accreditation","MediaAcceleration.aspx",0,"","",
"Supporting Media Partners","MediaPartners.aspx",0,"","",
"Downloads","DownloadShowLogos.aspx",0,"","",
"Press Release","ComingSoon.aspx",0,"","",
"News &amp; Events","NewsandEvents.aspx",0,"","",
"Press Conference","ComingSoon.aspx",0,"",""

)
m1mn11=new Array
(
"Contractor Registration","ContractorRegistrationInto.aspx",0,"",""
)
m1mn12=new Array
(
"Service Provider Registration","SeviceProviderRepresentativeInto.aspx",0,"",""
)

absPath=""
if(m1.v19&&!m1.v20){
if(window.location.href.lastIndexOf("\\")>window.location.href.lastIndexOf("/")) {sepCh = "\\" ;} 
else{sepCh="/";}
absPath=window.location.href.substring(0,window.location.href.lastIndexOf(sepCh)+1)}

m1.v61=0
m1.v02=m1.v23
m1.attr=new Array("12px",true,false,"#fff", "#b0ab39","#fff","Arial,Helvetica","#e3df4c","#fff","#fff")
m1.borderCol="#e3df4c"
document.write("<script language='JavaScript1.2' src='ts/drop1.js'></"+"script>")
//menu 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








function SwitchMenu4(obj){
if(document.getElementById){
var el = document.getElementById(obj);
var ar = document.getElementById("masterdiv4").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 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";
}}



//news st
var pausecontent=new Array()
pausecontent[0]='<p class="f4 na b"><A HREF="news.html#press-release">Press Release</A></p>This is the DEFAULT DESCRIPTION for NEWS. You are required to update it as per your requirement. The maximum allowed limit is 4000...<br><p class="h7 r f1 c8"><A HREF="#">&#187; Read More</a>'
function pausescroller(content, divId, divClass, delay){
this.content=content
this.tickerid=divId
this.delay=delay 
this.mouseoverBol=0 
this.hiddendivpointer=1 
if(content[1])
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
else
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[0]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) 
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) 
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) 
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))

this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) 
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}
pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}}
pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}
pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) 
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ 
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle)
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}
//news end






var dhtmlwindow={
imagefiles:['ts/min.gif','ts/close.gif','ts/restore.gif','ts/resize.gif'],
ajaxbustcache: true,
minimizeorder: 0,
tobjects: [],
init:function(t){
var domwindow=document.createElement("div")
domwindow.id=t
domwindow.className="dhtmlwindow"
var domwindowdata=''
domwindowdata='<div class="drag-handle">'
domwindowdata+='DHTML Window <div class="drag-controls" ></div>'
domwindowdata+='</div>'
domwindowdata+='<div class="drag-contentarea"></div>'
domwindowdata+='<div class="drag-statusarea"><div class="drag-resizearea"></div></div>'
domwindowdata+='</div>'
domwindow.innerHTML=domwindowdata
document.getElementById("dhtmlwindowholder").appendChild(domwindow)
this.zIndexvalue=(this.zIndexvalue)? this.zIndexvalue+1 : 100
var t=document.getElementById(t)
var divs=t.getElementsByTagName("div")
for(var i=0;i<divs.length;i++){
if(/drag-/.test(divs[i].className))
t[divs[i].className.replace(/drag-/,"")]=divs[i]}
t.style.zIndex=this.zIndexvalue
t.handle._parent=t
t.resizearea._parent=t
t.controls._parent=t
t.onclose=function(){return true}
t.onmousedown=function(){dhtmlwindow.zIndexvalue++;this.style.zIndex=dhtmlwindow.zIndexvalue}
t.handle.onmousedown=dhtmlwindow.setupdrag
t.resizearea.onmousedown=dhtmlwindow.setupdrag
t.controls.onclick=dhtmlwindow.enablecontrols
t.show=function(){dhtmlwindow.show(this)}
t.hide=function(){dhtmlwindow.close(this)}
t.setSize=function(w,h){dhtmlwindow.setSize(this,w,h)}
t.moveTo=function(x,y){dhtmlwindow.moveTo(this,x,y)}
t.isResize=function(bol){dhtmlwindow.isResize(this,bol)}
t.isScrolling=function(bol){dhtmlwindow.isScrolling(this,bol)}
t.load=function(contenttype,contentsource,title){dhtmlwindow.load(this,contenttype,contentsource,title)}
this.tobjects[this.tobjects.length]=t
return t
},
open:function(t,contenttype,contentsource,title,attr,recalonload){
var d=dhtmlwindow
function getValue(Name){
var config=new RegExp(Name+"=([^,]+)","i")
return(config.test(attr))? parseInt(RegExp.$1): 0}
if(document.getElementById(t)==null)
t=this.init(t)
else
t=document.getElementById(t)
t.setSize(getValue(("width")),(getValue("height")))
var xpos=getValue("center")? "middle" : getValue("left")
var ypos=getValue("center")? "middle" : getValue("top")
if(typeof recalonload!="undefined"&&recalonload=="recal"&&this.scroll_top==0){
if(window.attachEvent&&!window.opera)
this.addEvent(window,function(){setTimeout(function(){t.moveTo(xpos,ypos)},400)},"load")
else-
this.addEvent(window,function(){t.moveTo(xpos,ypos)},"load")}
t.isResize(getValue("resize"))
t.isScrolling(getValue("scrolling"))
t.style.visibility="visible"
t.style.display="block"
t.contentarea.style.display="block"
t.moveTo(xpos,ypos)
t.load(contenttype,contentsource,title)
if(t.state=="minimized"&&t.controls.firstChild.title=="Restore"){
t.controls.firstChild.setAttribute("src",dhtmlwindow.imagefiles[0])
t.controls.firstChild.setAttribute("title","Minimize")
t.state="fullview"}
parent.document.getElementById("qw").style.display="block"
return t
},
setSize:function(t,w,h){
t.style.width=Math.max(parseInt(w),150)+"px"
t.contentarea.style.height=Math.max(parseInt(h),100)+"px"
},
moveTo:function(t,x,y){
this.getviewpoint()
t.style.left=(x=="middle")? this.scroll_left+(this.docwidth-t.offsetWidth)/2+"px" : this.scroll_left+parseInt(x)+"px"
t.style.top=(y=="middle")? this.scroll_top+(this.docheight-t.offsetHeight)/2+"px" : this.scroll_top+parseInt(y)+"px"
},
isResize:function(t,bol){
t.statusarea.style.display=(bol)? "block" : "none"
t.resizeBool=(bol)? 1 : 0
},
isScrolling:function(t,bol){
t.contentarea.style.overflow=(bol)? "auto" : "hidden"
},
load:function(t,contenttype,contentsource,title){
var contenttype=contenttype.toLowerCase()
if(typeof title!="undefined")
t.handle.firstChild.nodeValue=title
if(contenttype=="inline")
t.contentarea.innerHTML=contentsource
else if(contenttype=="div"){
t.contentarea.innerHTML=document.getElementById(contentsource).innerHTML
document.getElementById(contentsource).style.display="none"}
else if(contenttype=="iframe"){
t.contentarea.style.overflow="hidden"
if(!t.contentarea.firstChild || t.contentarea.firstChild.tagName!="IFRAME")
t.contentarea.innerHTML='<iframe ID="qw" FRAMEBORDER="0" src="" style="margin:0; padding:0; width:100%; height:100%" name="_iframe-'+t.id+'"></iframe>'
window.frames["_iframe-"+t.id].location.replace(contentsource)}
else if(contenttype=="ajax"){
this.ajax_connect(contentsource,t)}
t.contentarea.datatype=contenttype
},





setupdrag:function(e){
var d=dhtmlwindow
var t=this._parent
d.etarget=this
var e=window.event || e
d.initmousex=e.clientX
d.initmousey=e.clientY
d.initx=parseInt(t.offsetLeft)
d.inity=parseInt(t.offsetTop)
d.width=parseInt(t.offsetWidth)
d.contentheight=parseInt(t.contentarea.offsetHeight)
if(t.contentarea.datatype=="iframe"){
t.style.backgroundColor="transparent"
t.contentarea.style.visibility="visible"}
document.onmousemove=d.getdistance
document.onmouseup=function(){
if(t.contentarea.datatype=="iframe"){
t.contentarea.style.backgroundColor="transparent"
t.contentarea.style.visibility="visible"}
d.stop()}
return false
},
getdistance:function(e){
var d=dhtmlwindow
var etarget=d.etarget
var e=window.event || e
d.distancex=e.clientX-d.initmousex
d.distancey=e.clientY-d.initmousey
if(etarget.className=="drag-handle")
d.move(etarget._parent,e)
else if(etarget.className=="drag-resizearea")
d.resize(etarget._parent,e)
return false
},
getviewpoint:function(){
var ie=document.all&&!window.opera
var domclientWidth=document.documentElement&&parseInt(document.documentElement.clientWidth)|| 100000
this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
this.docwidth=(ie)? this.standardbody.clientWidth :(/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth,window.innerWidth-16)
this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
},
rememberattrs:function(t){
this.getviewpoint()
t.lastx=parseInt((t.style.left || t.offsetLeft))-dhtmlwindow.scroll_left
t.lasty=parseInt((t.style.top || t.offsetTop))-dhtmlwindow.scroll_top
t.lastwidth=parseInt(t.style.width)
},
move:function(t,e){
t.style.left=dhtmlwindow.distancex+dhtmlwindow.initx+"px"
t.style.top=dhtmlwindow.distancey+dhtmlwindow.inity+"px"
},
resize:function(t,e){
t.style.width=Math.max(dhtmlwindow.width+dhtmlwindow.distancex,150)+"px"
t.contentarea.style.height=Math.max(dhtmlwindow.contentheight+dhtmlwindow.distancey,100)+"px"
},
enablecontrols:function(e){
var d=dhtmlwindow
var sourceobj=window.event? window.event.srcElement : e.target
if(/Minimize/i.test(sourceobj.getAttribute("title")))
d.minimize(sourceobj,this._parent)
else if(/Restore/i.test(sourceobj.getAttribute("title")))
d.restore(sourceobj,this._parent)
else if(/Close/i.test(sourceobj.getAttribute("title")))
d.close(this._parent)
return false
},
minimize:function(button,t){
dhtmlwindow.rememberattrs(t)
button.setAttribute("src",dhtmlwindow.imagefiles[2])
button.setAttribute("title","Restore")
t.state="minimized"
t.contentarea.style.display="none"
t.statusarea.style.display="none"
if(typeof t.minimizeorder=="undefined"){
dhtmlwindow.minimizeorder++
t.minimizeorder=dhtmlwindow.minimizeorder}
t.style.left="10px"
t.style.width="200px"
var windowspacing=t.minimizeorder*10
t.style.top=dhtmlwindow.scroll_top+dhtmlwindow.docheight-(t.handle.offsetHeight*t.minimizeorder)-windowspacing+"px"
},
restore:function(button,t){
dhtmlwindow.getviewpoint()
button.setAttribute("src",dhtmlwindow.imagefiles[0])
button.setAttribute("title","Minimize")
t.state="fullview"
t.style.display="block"
t.contentarea.style.display="block"
if(t.resizeBool)
t.statusarea.style.display="block"
t.style.left=parseInt(t.lastx)+dhtmlwindow.scroll_left+"px"
t.style.top=parseInt(t.lasty)+dhtmlwindow.scroll_top+"px"
t.style.width=parseInt(t.lastwidth)+"px"
},
close:function(t){
try{
var closewinbol=t.onclose()}
catch(err){
var closewinbol=true}
finally{
if(typeof closewinbol=="undefined"){
alert("An error has occured somwhere inside your \"onclose\" event handler")
var closewinbol=true}}
if(closewinbol){
if(t.state!="minimized")
dhtmlwindow.rememberattrs(t)
t.style.display="none"}
return closewinbol
},
show:function(t){
if(t.lastx)
dhtmlwindow.restore(t.controls.firstChild,t)
else
t.style.display="block"
t.state="fullview"
},
ajax_connect:function(url,t){
var page_request=false
var bustcacheparameter=""
if(window.XMLHttpRequest)
page_request=new XMLHttpRequest()
else if(window.ActiveXObject){
try{
page_request=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){
try{
page_request=new ActiveXObject("Microsoft.XMLHTTP")}
catch(e){}}}
else
return false
page_request.onreadystatechange=function(){dhtmlwindow.ajax_loadpage(page_request,t)}
if(this.ajaxbustcache)
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime(): "?"+new Date().getTime()
page_request.open('GET',url+bustcacheparameter,true)
page_request.send(null)
},
ajax_loadpage:function(page_request,t){
if(page_request.readyState==4&&(page_request.status==200 || window.location.href.indexOf("http")==-1)){
t.contentarea.innerHTML=page_request.responseText}
},
stop:function(){
dhtmlwindow.etarget=null
document.onmousemove=null
document.onmouseup=null
},
addEvent:function(target,functionref,tasktype){
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if(target.addEventListener)
target.addEventListener(tasktype,functionref,false)
else if(target.attachEvent)
target.attachEvent(tasktype,functionref)
},
cleanup:function(){
for(var i=0;i<dhtmlwindow.tobjects.length;i++){
dhtmlwindow.tobjects[i].handle._parent=dhtmlwindow.tobjects[i].resizearea._parent=dhtmlwindow.tobjects[i].controls._parent=null}
window.onload=null
}}
document.write('<div id="dhtmlwindowholder"><span style="display:none">.</span></div>')
window.onunload=dhtmlwindow.cleanup



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";
}}









