﻿function getListCategoryByIndex(index)
{
    return  processinfo.getListCategoryByIndex(index);
}
function countItemRootByIndex(index)
{
	return processinfo.countItemRootByIndex(index);
}
function getTopListCategory(top)
{
	return processinfo.getTopListCategory(top);
}
function countChild()
{
	return  processinfo.countChild();
}
function getUtilityInfo(style)
{
	return processinfo.getUtilityInfo(style);
}

function getPageConfigInfo()
{
	return processinfo.getPageConfigInfo();			
}
function checkExistAccount(username,clientid)
{
    if(username!="")
    {
	    if(processinfo.checkExistAccount(username).value)
	    {
	        alert("Lổi : "+username+" đã tồn tại,vui lòng chọn tên đăng nhập khác.");
	        document.getElementById(clientid).value="";
	        document.getElementById(clientid).focus();
	    }
	}
}
function checkExitsEmail(email,clientid)
{
    if(email!="")
    {
        if(email!=temp_email)
        {
            if(processinfo.checkExitsEmail(email).value)
	        {
	            alert("Lổi : "+email+" đã tồn tại,vui lòng chọn email khác.");
	            document.getElementById(clientid).value="";
	            document.getElementById(clientid).focus();
	        }
	    }
	}
}
function checkExitsUsernameEmployee(username)
{
    if(username!="")
    {
	    if(processinfo.checkExitsUsernameEmployee(username).value)
	    {
	        alert("Username : "+username+" has exited ! Please choose other username");
	        document.getElementById('_ctl0_ContentPlaceHolder1_txt_username').value="";
	        document.getElementById('_ctl0_ContentPlaceHolder1_txt_username').focus();
	    }
	}
}
function checkExitsEmailEmployee(email)
{
    if(email!="")
    {
        if(email!=temp_email)
        {
            if(processinfo.checkExitsEmailEmployee(email).value)
	        {
	            alert("Email : "+email+" has exited ! Please choose other email");
	            document.getElementById('_ctl0_ContentPlaceHolder1_txt_Email').value="";
	            document.getElementById('_ctl0_ContentPlaceHolder1_txt_Email').focus();
	        }
	    }
	}
}

function checkExitsUsernameEmployer(username)
{
    if(username!="")
    {
	    if(processinfo.checkExitsUsernameEmployer(username).value)
	    {
	        alert("Username : "+username+" has exited ! Please choose other username");
	        document.getElementById('_ctl0_ContentPlaceHolder1_txt_username').value="";
	        document.getElementById('_ctl0_ContentPlaceHolder1_txt_username').focus();
	    }
	}
}
function checkExitsEmailEmployer(email)
{
    if(email!="")
    {
        if(email!=temp_email)
        {
            if(processinfo.checkExitsEmailEmployer(email).value)
	        {
	            alert("Email : "+email+" has exited ! Please choose other email");
	            document.getElementById('_ctl0_ContentPlaceHolder1_txt_Email').value="";
	            document.getElementById('_ctl0_ContentPlaceHolder1_txt_Email').focus();
	        }
	    }
	}
}
function deleteResume(resumeid)
{
	return processinfo.deleteResume(resumeid);
}
function deleteJob(jobid)
{
	return processinfo.deleteJob(jobid);
}
function formatStyleDate(dateformat,style)
{
	var objDate= new Date(dateformat);
	var myDate = objDate.getDate();
	var myMonth = objDate.getMonth() + 1;
	
	if(myDate<10)
	{
		myDate = "0" + myDate; 
	}
	
	if(myMonth<10)
	{
		myMonth="0" + myMonth;
	}
	var myYear = objDate.getFullYear();
	
	switch(style.toLowerCase())
	{
		case 'dd/mm/yyyy' :
		{
			return (myDate + '/' + myMonth + '/' + myYear);
			break;
		}
		case 'mm/dd/yyyy' :
		{
			return  (myMonth + '/' + myDate + '/' + myYear);
			break;
		}
		case 'yyyy/mm/dd' :
		{
			return  (myYear + '/' + myMonth + '/' + myDate);
			break;
		} 
	}
	
}
function SaveJob(EmployeeID,JobID)
{
    return processinfo.SaveJob(EmployeeID,JobID);
}

function deleteSaveJob(tbid)
{
    return processinfo.deleteSaveJob(tbid);
}
function deleteApplyJob(tbid)
{
    return processinfo.deleteApplyJob(tbid);
}
function CountApplicationByJobID(jobid)
{
    return processinfo.CountApplicationByJobID(jobid);
}
function getListBannerByPosition(pos)
{
    return processinfo.getListBannerByPosition(pos);
}
function insertNewLetter(email)
{
    return processinfo.insertNewLetter(email);
}
function SS(name,value)
{
    processinfo.SS(name,value);
}
function IsSSNull(name)
{
    return processinfo.IsSSNull(name);
}
function LoadInfo()
{
    return processinfo.LoadInfo();
}
function decr(string)
{
   return processinfo.decr(string).value;
}
function adddomain(ProductName, TenChuThe, CMND, DiaChi, TinhThanh, QuocGia, SoDienThoai, SoFax,ThuDienTu, TrangChu, PrimaryDNSName, PrimaryIP, SecondaryDNSName, SecondaryIP, QuanlyHoTen, QuanlyChucVu,QuanlyDiaChi, QuanlyTinhThanhPho, QuanlyQuocGia, QuanlyDienThoai, QuanlyFax,QuanlyEmail, KythuatHoTen, KythuatChucVu, KythuatDiaChi, KythuatTinhThanhPho,KythuatQuocGia, KythuatDienThoai, KythuatFax, KythuatEmail,cartid,prid)
{
    return processinfo.adddomain(ProductName, TenChuThe, CMND, DiaChi, TinhThanh, QuocGia,SoDienThoai, SoFax,ThuDienTu, TrangChu, PrimaryDNSName,PrimaryIP, SecondaryDNSName, SecondaryIP, QuanlyHoTen, QuanlyChucVu,QuanlyDiaChi, QuanlyTinhThanhPho, QuanlyQuocGia, QuanlyDienThoai, QuanlyFax,QuanlyEmail, KythuatHoTen, KythuatChucVu, KythuatDiaChi, KythuatTinhThanhPho,KythuatQuocGia, KythuatDienThoai, KythuatFax, KythuatEmail,cartid,prid);
}
function  addhosting( ProductName,  TenChuThe,  CMND,  DiaChi,  SoDienThoai,  ThuDienTu,  TenDomain,  NgonNgu,  NgonNguKhac,  HeDieuHanh,cartID)
{
    return processinfo.addhosting( ProductName,  TenChuThe,  CMND,  DiaChi,  SoDienThoai,  ThuDienTu,  TenDomain,  NgonNgu,  NgonNguKhac,HeDieuHanh,cartID);
}