/*
	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


var showSortable=function(_1){
dojo.style(_1,"cursor","pointer");
dojo.some(dojo.query("span",_1),function(_2){
if(dojo.attr(_2,"name")=="sortText"){
dojo.style(_2,"textDecoration","underline");
return true;
}
});
};
var hideSortable=function(_3){
dojo.style(_3,"cursor","");
dojo.some(dojo.query("span",_3),function(_4){
if(dojo.attr(_4,"name")=="sortText"){
dojo.style(_4,"textDecoration","");
return true;
}
});
};
var createDialog=function(_5,_6){
if(dijit.byId(_5)){
destroyDialog(_5);
}
var _7=new g_widgets.DualDialog({isModal:false,id:_5,refreshOnShow:true,style:_6,afterLoad:function(){
performAfterLoad(this);
},href:""});
dojo.body().appendChild(_7.domNode);
if(dojo.isIE<=6){
new dijit.BackgroundIframe(_7.domNode);
}
};
var destroyDialog=function(id){
if(dijit.byId(id)){
dijit.byId(id).destroyRecursive();
}
if(dijit.byId(id)){
dijit.byId(id).destroy();
}
};
var closeDialog=function(){
dijit.byId("nonModalDialog").hide();
};
var gotoPage=function(_9){
closeDialog();
window.location.href=_9;
};
var showMSDS=function(_a){
var _b="http://complyplus.grainger.com";
var _c=_b+"/grainger/loadmsds.asp?id=";
_c+=_a;
var _d=100;
var _e=200;
var _f="toolbar=yes,location=no,status=no,menubar=yes,scrollbars=yes,resizable=no,width=765,height=500,top="+_d+",left="+_e;
var _10=window.open(_c,null,_f);
if(window.focus){
_10.focus();
}
};
var showQuantiyInfo=function(url,_12){
createDialog("nonModalDialog","top: 502.5px; left: 185px;width:430px;height:325px;border: 3px double #C0C0C0;background: #FFFFFF ;padding-left: 0px;padding-right: 0px;");
var _13=dijit.byId("nonModalDialog");
_13.href=url;
_13.loadingMessage="<div align=\"center\" class=\"addItemProcessing\"><img src=\""+_12+"/images/spinner-anim.gif\" alt=\"Please wait\" title=\"Please wait\" />"+"<p>Please wait while we process your request.</p></div>";
_13.show();
_13.hideTitleBar();
};
var performCompare=function(){
showCompareMsg("",true);
window.setTimeout(_performCompare,350);
};
var showCompareMsg=function(_14,_15){
var _16=dijit.byId("compareErrorDialog");
_16.containerNode.style.padding=0;
if(_15){
dojo.byId("compareMsgPane").style.display="none";
dojo.byId("loadingPane").style.display="block";
}else{
dojo.byId("loadingPane").style.display="none";
dojo.byId("compareMsgPane").style.display="block";
dojo.byId("compareErrMsg").innerHTML=_14;
}
_16.show();
};
var createPLOrderDialog=function(){
createDialog("nonModalDialog","top: 502.5px; left: 185px;width:430px;height:325px;border: 3px double #C0C0C0;background: #FFFFFF ;padding-left: 0px;padding-right: 0px;");
};
