/*
 * rk_custom_v7a.js
 *
 * (c) 2007 Arcaysis Limited - All Rights Reserved
 *
 *	Arcaysis Widget Functions
 */
//
// JSLint "helper"
/*global window, document, navigator, alert, self, MM_findObj */
function fnQAddPromptFocus(){var e=document.forms["QuickAddForm"];if(e.SOP_ORDI_STK_PROD_CODE.value=="Product Code"){e.SOP_ORDI_STK_PROD_CODE.value="";}}
function fnQAddPromptBlur(){var f=document.forms["QuickAddForm"];if(f.SOP_ORDI_STK_PROD_CODE.value===""){f.SOP_ORDI_STK_PROD_CODE.value="Product Code";}}
function fnQuickAdd(){var m=document.forms["QuickAddForm"];m.submit();}
function fnQuickAddOnSubmit(){return true;}
function fnQSearchPromptFocus(objField){if(objField.name!="SEARCH_PHRASE"){alert("rk_custom_v7a:fnQSearchPromptFocus:Error - objField.name="+objField.name);}if(objField.value=="Search Phrase"){objField.value="";}}
function fnQSearchPromptBlur(objField){if(objField.name!="SEARCH_PHRASE"){alert("rk_custom_v7a:fnQSearchPromptBlur:Error - objField.name="+objField.name);}if(objField.value===""){objField.value="Search Phrase";}}
function fnQSearchSubmit(objForm){if(objForm.SEARCH_PHRASE=="undefined"){alert("rk_custom_v7a:fnQSearchSubmit:Error - SEARCH_PHRASE undefined");}if(objForm.SEARCH_PHRASE.value=="Search Phrase"){alert("Please Supply a Search Phrase");objForm.SEARCH_PHRASE.focus();return false;}else{return true;}}
function fnHideBuyError(){var o=MM_findObj("BuyError");o.style.display="none";}
function fnHideValError(){var o=MM_findObj("ValError");o.style.display="none";}
/*DEL
function fnAddItem(strForm,strCode,intPos,intMode){var p="SPC"+strCode;var b;var g;var h;var oForm;b=MM_findObj(p);g=MM_findObj("listing");h=MM_findObj("loading");if(isNaN(b.value)){alert("Item value "+b.value+" is not a number!");b.focus();return;}if(b.value<0||b.value>99999){alert("Item value "+b.value+" is not between 0 and 99999!");b.focus();return;}if(intMode==1&&(b.defaultValue==b.value)){alert('Basket already contains that number of items.\nChange the quantity to Update your order\n');b.focus();return;}self.scrollTo(0,0);if(g){g.style.display="none";}if(h){h.style.display="block";}oForm=document.forms[strForm];oForm.STK_PROD_CODE.value=strCode;oForm.CMD.value="BUY";oForm.ORDER_ITEMS.value=b.value;oForm.ORDER_POS.value=intPos;oForm.submit();}
*/
function fnAddItem(strForm,strCode,intPos,intMode){var p="SPC"+strCode;var b;var oForm;b=MM_findObj(p);if(isNaN(b.value)){alert("Item value "+b.value+" is not a number!");b.focus();return;}if(b.value<0||b.value>99999){alert("Item value "+b.value+" is not between 0 and 99999!");b.focus();return;}if(intMode==1&&(b.defaultValue==b.value)){alert('Basket already contains that number of items.\nChange the quantity to Update your order\n');b.focus();return;}self.scrollTo(0,0);RK_showHideLayers('listing','hide','loading','show');oForm=document.forms[strForm];oForm.STK_PROD_CODE.value=strCode;oForm.CMD.value="BUY";oForm.ORDER_ITEMS.value=b.value;oForm.ORDER_POS.value=intPos;oForm.submit();}
/*DEL
function fnShowProdFilter(strForm, strFormDiv, strShowLinkDiv){var c=MM_findObj(strFormDiv);if(c){c.style.display='block'};c=MM_findObj(strShowLinkDiv);if(c){c.style.display='none'};d=MM_findObj(strForm);if(d){d.IS_SEARCH.value=1;}}
*/
function fnShowProdFilter(strForm, strFormDiv, strShowLinkDiv){var d; RK_showHideLayers(strFormDiv,'show',strShowLinkDiv,'hide');d=MM_findObj(strForm);if(d){d.IS_SEARCH.value=1;}}
/*DEL
function fnHideProdFilter(strForm, strFormDiv, strShowLinkDiv){var d=MM_findObj(strShowLinkDiv);if(d){d.style.display='block'};d=MM_findObj(strFormDiv);if(d){d.style.display='none'};d=MM_findObj(strForm);if(d){d.IS_SEARCH.value=0;}}
*/
function fnHideProdFilter(strForm, strFormDiv, strShowLinkDiv){var d; RK_showHideLayers(strShowLinkDiv,'show',strFormDiv,'hide');d=MM_findObj(strForm);if(d){d.IS_SEARCH.value=0;}}
/*DEL
function fnProdSearchSubmit(objForm){objForm.submit();}
*/
function fnProdSearchSubmit(strForm){var o; o=MM_findObj(strForm);if(o){return o.submit();}else{return false;}}
/*DEL
function fnEmailWhenInStock(strForm,strCode){var i;var j;var oForm;i=MM_findObj("listing");j=MM_findObj("loading");self.scrollTo(0,0);if(i){i.style.display="none";}if(j){j.style.display="block";}oForm=document.forms[strForm];oForm.STK_PROD_CODE.value=strCode;oForm.CMD.value="OSN";oForm.submit();}
*/
function fnEmailWhenInStock(strForm,strCode){var oForm;self.scrollTo(0,0);RK_showHideLayers('listing','hide','loading','show');oForm=document.forms[strForm];if(oForm){oForm.STK_PROD_CODE.value=strCode;oForm.CMD.value="OSN";oForm.submit();}}
function fnWishFor(strForm,strCode){var k;var l;var oForm;k=MM_findObj("listing");l=MM_findObj("loading");self.scrollTo(0,0);if(k){k.style.display="none";}if(l){l.style.display="block";}oForm=document.forms[strForm];oForm.STK_PROD_CODE.value=strCode;oForm.CMD.value="WISH";oForm.submit();}



