var WinCE = {
userAgent:"",
MainCategoryClick:function(itemType,params,url,parentStack)
{
LoadChildren1(itemType,params,url);
parentStacking(parentStack);
},
CategorySubProducts:function(proID,itemType,params,HRProducts)
{
SetSourceWithCommands('../ProductFiles/'+ proID +'/1/1/resolution/index.htm');
ShowHideProductCommands(itemType,params,'?product_id='+params+'&amp;ProductCategory='+ HRProducts ,params,'nosearch');
},
CategorySubProductsTwo:function(itemType,proID,itemID,params,HRProducts,proCatID,proStackID,QueryURL)
{
SetSourceWithCommands('../ProductFiles/+ proID +/1/1/resolution/index.htm');
totalPriceRemover();
RelatedProduct(itemID);
LoadProductImageFiles('AJAX/MediaSlideShow.aspx?product_id='+ itemID +'', itemID);
ShowHideProductCommands(itemType, params,'?product_id='+ params +'&amp;ProductCategory=~'+ HRProducts,params,'nosearch');
productStack(proCatID,proStackID);
productQuerryURL(QueryURL);
WAP.ShowHideElements("leftbartable",'none');
WAP.ShowHideElements("IFrameTD",'block');
},
GetProduct:function(proID,itemID,itemType,params,HRProducts,QueryURL){
var src = '../ProductFiles/~product_id~/1/1/resolution/index.htm'
window.frames["frame_details"].location.replace(src)
RelatedProduct('~VAR_item_id~');
ShowHideProductCommands(itemType,params,'?product_id='+ params +'&amp;ProductCategory='+ HRProducts +'',params,'nosearch');
productQuerryURL(QueryURL);
WAP.ShowHideElements("DIV_LIST",'none');
},
GetSearchProduct:function(){
WAP.ShowHideElements("IFrameTD",'none');
SearchProducts();
},
MyAccount:function(){
getIPhoneIViewFor("myaccount");
SetSource('customer/home.aspx');
WAP.ShowHideElements("DIV_LIST",'none');
WAP.EmptyElement('stackText');
},
Home:function(){
getIPhoneIViewFor("refresh");
CatLoadCaller();
Workflow_ClearContainer();
WAP.EmptyElement('stackText');
},
Init:function(){
if (WAP.MSIEMobile()){sldbox = 3};
},
SetVariable:function(variable,value){
if(WAP.MSIEMobile()){
switch(variable){
case "sldbox" : sldbox  = 3; break;
}
}
}
}
var WAP = {
GetBrowser:function(){
var ua = "";
if (navigator.userAgent.indexOf('iPhone') !=  -1)
{
ua = "iPhone";
}else if(navigator.userAgent.indexOf('MSIEMobile') !=  -1)
{
ua = "MSIEMobile";
}else
{
ua = "MSIE"
}
return ua;
},
Init:function(){ WAP.GetBrowser();	},
iPhone:function(){	return (WAP.GetBrowser() == "iPhone")?true:false; },
MSIEMobile:function(){ return (WAP.GetBrowser() == "MSIEMobile")?true:false; },
ShowHideElements:function(eID,eValue){	document.getElementById(eID).style.display = eValue;},
RedirectPageRespectToBrowser: function() {
var domain = window.location.protocol + "//" + window.location.hostname ;
switch(WAP.GetBrowser()){
case "iPhone"		:  window.location.href =  (domain += "/wap_default.aspx"); break;
case "MSIEMobile"	:  window.location.href =  (domain += "/MSIEMobile.aspx");	break;
}
},
SwitchString:function(normal,wap){
if(WAP.GetBrowser() != "MSIE"){
return wap;
}else{
return normal;
}
},
EmptyElement:function(eID){
document.getElementById(eID).innerHTML = "";
}
}

