function Browser(){this.isIE=false;this.isFF=false;this.isSF=false;this.isNS=false;this.version=null;ua=navigator.userAgent;s="MSIE";if((i=ua.indexOf(s))>=0){this.isIE=true;this.version=parseFloat(ua.substr(i+s.length));return;}
s="Firefox";if((i=ua.indexOf(s))>=0){this.isFF=true;this.version=parseFloat(ua.substr(i+s.length));return;}
s="Safari";if((i=ua.indexOf(s))>=0){this.isSF=true;this.version=parseFloat(ua.substr(i+s.length));return;}
s="Gecko";if((i=ua.indexOf(s))>=0){this.isNS=true;this.version=6.1;return;}}
var browser=new Browser();function tab1612108977(tab_id,tabs_count,tabs_ref)
{var flag=false;for(var i=1;i<=tabs_count;i++)
{if(tab_id==i)
{flag=true;document.getElementById('hdnTabNo').value=tab_id;document.getElementById('tab1612108977_'+i).className='current';if(tabs_ref==1)
document.Form1.submit();}
else
{document.getElementById('tab1612108977_'+i).className='';}}
if(!flag)
document.getElementById('tab1612108977_'+1).className='current';}
var _lastMenu=null;function _toggleMenu(e,menuId)
{if(_lastMenu!=null&&_lastMenu!=menuId)
{document.getElementById(_lastMenu).style.display='none';_lastMenu=null;}
if(document.getElementById(menuId).style.display=='none')
{document.getElementById(menuId).style.display='block';_lastMenu=menuId;e.cancelBubble=true;if(e.stopPropagation)
{e.stopPropagation();}
document.onclick=_hideLastMenu;}
else
{document.getElementById(menuId).style.display='none';document.onclick=null;}}
function _hideLastMenu()
{if(_lastMenu!=null)
{document.getElementById(_lastMenu).style.display='none';_lastMenu=null;document.onclick=null;}}
function OpenJobProof(JobID)
{if(JobID!="")
{var url="ProofResult.aspx?jobID="+JobID+"&refresh=n";var popUp;var winTitle="Proof";if(JobID!="-1")
{popUp=window.open(url,winTitle,"height=670,Width=645,top=0,scrollbars=yes,resizable=yes");}}}
function ShowErrorMessage(errMessage)
{alert(errMessage);}
function openWindow(url)
{popupWin=window.open(url,'remote','width=640,height=480,top=100,left=100');}
function openSelectList(EId,OPId,OId,DeliveryId)
{if(EId!='')
window.open('ViewSelectList.aspx?EId='+EId+'&DeliverId='+DeliveryId,'ViewSampleList','width=770,height=580,left=100,top=100,status=no,resizable=yes');else
window.open('ViewSelectList.aspx?OPId='+OPId+'&OId='+OId+'&DeliverId='+DeliveryId,'ViewSampleList','width=770,height=580,left=100,top=100,status=no,resizable=yes');return false;}
var offsetfromcursorX=12
var offsetfromcursorY=10
var offsetdivfrompointerX=10
var offsetdivfrompointerY=14
document.write('<div id="dhtmltooltip"></div>')
var ie=document.all
var ns6=document.getElementById&&!document.all
var enabletip=false
if(ie||ns6)
var tipobj=document.all?document.all["dhtmltooltip"]:document.getElementById?document.getElementById("dhtmltooltip"):""
var pointerobj=document.all?document.all["dhtmlpointer"]:document.getElementById?document.getElementById("dhtmlpointer"):""
function ietruebody(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}
function ddrivetip(thetext,thewidth,thecolor){if(ns6||ie){if(typeof thewidth!="undefined")tipobj.style.width=thewidth+"px"
if(typeof thecolor!="undefined"&&thecolor!="")tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false}}
function positiontip(e){if(enabletip){var nondefaultpos=false
var curX=(ns6)?e.pageX:event.clientX+ietruebody().scrollLeft;var curY=(ns6)?e.pageY:event.clientY+ietruebody().scrollTop;var winwidth=ie&&!window.opera?ietruebody().clientWidth:window.innerWidth-20
var winheight=ie&&!window.opera?ietruebody().clientHeight:window.innerHeight-20
var rightedge=ie&&!window.opera?winwidth-event.clientX-offsetfromcursorX:winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera?winheight-event.clientY-offsetfromcursorY:winheight-e.clientY-offsetfromcursorY
var leftedge=(offsetfromcursorX<0)?offsetfromcursorX*(-1):-1000
if(rightedge<tipobj.offsetWidth){tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true}
else if(curX<leftedge)
tipobj.style.left="5px"
else{tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"}
if(bottomedge<tipobj.offsetHeight){tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true}
else{tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"}
tipobj.style.visibility="visible"
if(!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"}}
function hideddrivetip(){if(ns6||ie){enabletip=false
tipobj.style.visibility="hidden"
pointerobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''}}
document.onmousemove=positiontip
function InitModelDialog()
{Hide();DOMManager.sweep();addExtensionsForOpera();attachOpacityCSS();adjustHeight();g_Modal=new ModalDialog("ModalBG","DialogWindow","DialogContent","DialogActionBtn");addEventToObject(window,'onload',rssFetchAndDisplay.Init);}
function mainshow(dialogID)
{var ajax=_.ajax();ajax.removeAllFields();ajax.addField("name","John");ajax.addField("surname","Doe");ajax.oncomplete=ajax_complete;ajax.onerror=ajax_error;g_Modal.show("Getting Data");Showall(dialogID);ajax.get(document.getElementById('DialogWindow').style.display="inline");g_Modal.disableClose();g_Modal.enableClose();return false;}
function Showall(dialogID)
{document.getElementById('MainDiv').style.display="inline";document.getElementById('ModalBG').style.display="inline";document.getElementById(dialogID).style.display="inline";}
function main1()
{return false;}
function adjustHeight()
{var intWindowHeight=WindowObject.getInnerDimension().getY();var dynModalBG=new DynamicLayer("ModalBG");var intModalHeight=dynModalBG.getHeight();if(intModalHeight<intWindowHeight)
{dynModalBG.setHeight(intWindowHeight);}}
function addExtensionsForOpera()
{var ModalBG=new CBObject("ModalBG").getObject();if(typeof(window.opera)!="undefined")
{ModalBG.className="modalOpera";}}
function ajax_complete(strResponseText,objResponseXML)
{g_Modal.show(strResponseText);g_Modal.enableClose();}
function ajax_error(intStatus,strStatusText)
{g_Modal.show("Error code: ["+intStatus+"] error message: ["+
strStatusText+"].");g_Modal.enableClose();}
function CloseButtonClick()
{document.getElementById('DialogWindow').style.display="none";DialogWindow.disabled=false;DialogWindow.hideFocus;document.getElementById('DialogActionBtn').style.display="none";document.getElementById('MainDiv').style.display="none";document.getElementById('ModalBG').style.display="none";document.getElementById('DialogContent1').style.display="none";return false;}
function attachOpacityCSS()
{var opacityCSS=document.createElement("link");opacityCSS.type="text/css";opacityCSS.rel="stylesheet";opacityCSS.href="Opacity.css";document.getElementsByTagName("head")[0].appendChild(opacityCSS);}
function SetDivHeight()
{document.getElementById('DialogWindow').offsetHeight=37;alert(document.getElementById('DialogWindow').offsetHeight);}
function window_resize(evt)
{adjustHeight();}
function clone()
{if(document.getElementById('DialogWindow').style.display="none")
{alert(document.getElementById('DialogWindow').style.display="inline");document.getElementById('DialogWindow').style.display="inline";}
else
{return false;}}
function Hide()
{document.getElementById('DialogWindow').style.display="none";}