var _curImage;
_curImage = 0;
function ASRMouseEffectOn(pObj, pNumber)
{
if(pObj.src.toLowerCase().indexOf('on.gif') > 0)
{
_curImage = pNumber;
}
switch(pNumber)
{
case 1:
pObj.src = 'http://bxindia.intel.com/images/AdminImages/roll_selectedpending.gif';
break;
case 2:
pObj.src = 'http://bxindia.intel.com/images/AdminImages/roll_selectedrejected.gif';
break;
}
}
function ASRMouseEffectOff(pObj, pNumber)
{
if(_curImage>0)
{
switch(_curImage)
{
case 1:
pObj.src = 'http://bxindia.intel.com/images/AdminImages/selectedpending_1on.gif';
break;
case 2:
pObj.src = 'http://bxindia.intel.com/images/AdminImages/selectedrejected_1on.gif';
break;
}
}
else
{
switch(pNumber)
{
case 1:
pObj.src = 'http://bxindia.intel.com/images/AdminImages/unselectedpending_1.gif';
break;
case 2:
pObj.src = 'http://bxindia.intel.com/images/AdminImages/unselectedrejected_1.gif';
break;
}
}
_curImage = 0;
}
function chkDrop(_ErrorID,_LblID,pDrop)
{
var errorID = document.getElementById(_ErrorID);
var lblID = document.getElementById(_LblID);
var Drop = document.getElementById(pDrop);
if (Drop.value==-1)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please select City';
return false;
}
errorID.style.display = 'none';
lblID.innerHTML = '';
return true; 
}
function HideVerifyBox1(divVerify)
{
var divVerifyBox = document.getElementById(divVerify);
divVerifyBox.style.display = 'none';
}
function hideLabel(pLblChkCounter,plnkValue,pdivUpload)
{
var LblChkCounter = document.getElementById(pLblChkCounter);
var lnkValue = document.getElementById(plnkValue);
var divUpload = document.getElementById(pdivUpload);
if (lnkValue.innerHTML=='[Or upload your company file]')
{
LblChkCounter.style.display = "inline"
divUpload.style.display = "none"
}
else
{
LblChkCounter.style.display='none';
divUpload.style.display = "block"
}         
}
function showHidPanel(LnkEditAddress,pDivUpdateAddress,pLnkSubmit,pAddress1,pAddress2,pState,pCity,pZipCode,pFaxNumber,Std1,Phone1,Ext1,phone2,Ext2,phone3,Ext3,rowEditAddress3PhoneNumber2,rowEditAddress3PhoneNumber3,rowEditAddress3AddMorePhoneNumbers,hdnEditCurrentPhoneNums3,rowEditAddress3City)
{
document.getElementById(pDivUpdateAddress).style.display="block";
document.getElementById(pLnkSubmit).style.display="inline";
document.getElementById(LnkEditAddress).style.display="none";
document.getElementById(pAddress1).value='';
document.getElementById(pAddress1).disabled=false;
document.getElementById(pAddress2).value='';
document.getElementById(pZipCode).value='';
document.getElementById(pFaxNumber).value='';
document.getElementById(pState).value=0;
var selectbox =document.getElementById(pCity);
document.getElementById(Ext1).value='';
document.getElementById(Std1).value='';
document.getElementById(Phone1).value='';
if (document.getElementById(rowEditAddress3City)!=null)
{
if (document.getElementById(rowEditAddress3City).style.display=="block")
{
document.getElementById(rowEditAddress3City).style.display="none";
}
}
if (document.getElementById(rowEditAddress3PhoneNumber2)!=null)
{
if (document.getElementById(rowEditAddress3PhoneNumber2).style.display=="block")
{
document.getElementById(rowEditAddress3PhoneNumber2).style.display="none";
document.getElementById(phone2).value='';
document.getElementById(Ext2).value='';
}
}
if (document.getElementById(rowEditAddress3PhoneNumber3)!=null)
{
if (document.getElementById(rowEditAddress3PhoneNumber3).style.display=="block")
{   
document.getElementById(rowEditAddress3PhoneNumber3).style.display="none";
document.getElementById(phone3).value='';
document.getElementById(Ext3).value='';
}
}
document.getElementById(rowEditAddress3AddMorePhoneNumbers).style.display="block";
if (document.getElementById(hdnEditCurrentPhoneNums3)!=null)
{
document.getElementById(hdnEditCurrentPhoneNums3).value=1;
}
}
function SwitchLink_1(pSrcControlID, pOriginalTargetControlID, pNewTargetControlID, pOriginalText, pNewText, pHdnControlID)
{
HideRowError();
var control = document.getElementById(pSrcControlID);
var hdnControl = document.getElementById(pHdnControlID);
if(control.innerHTML.toUpperCase() == pNewText.toUpperCase())
{
control.innerHTML = pOriginalText;
ShowHide(pOriginalTargetControlID, 'block');
ShowHide(pNewTargetControlID, 'none');
if(hdnControl != null)
hdnControl.value = pOriginalText;
}
else
{
control.innerHTML = pNewText;
ShowHide(pOriginalTargetControlID, 'none');
ShowHide(pNewTargetControlID, 'inline');
if(hdnControl != null)
hdnControl.value = pNewText;
}
}
function SMBProfileComplete(pID1, pID2)
{
var value1 = document.getElementById(pID1).value;
var value2 = document.getElementById(pID2).value;
if(value1.toLowerCase() == 'y')
{
document.getElementById('SMBBI').style.background = 'transparent';
}
else
{
document.getElementById('SMBBI').style.background = '#FCC';
}
if(value2.toLowerCase() == 'y')
{
document.getElementById('SMBVC').style.background = 'transparent';
}
else
{
document.getElementById('SMBVC').style.background = '#FCC';
}
}
function ResellerProfileComplete(pID)
{
var value2 = document.getElementById(pID).value;
if(value2.toLowerCase() == 'y')
{
document.getElementById('ResellerVC').style.background = 'transparent';
}
else
{
document.getElementById('ResellerVC').style.background = '#FCC';
}
}
function openpopup(url)
{
HideRowError();
window.open(url,'popup','toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=800,height=500,left=5,top=50');
}
function SwitchOther(pSrcControl, pTargetControlID)
{
var selText = pSrcControl.options[pSrcControl.selectedIndex];
if(selText.innerHTML.toUpperCase() == 'OTHER')
ShowHide(pTargetControlID, 'block');
else
ShowHide(pTargetControlID, 'none');
}
function ClearOther(pSrcControl)
{
document.getElementById(pSrcControl).value= '';
}
function SelectCity(pSrcControl, pTargetControlID, pTargetControlText)
{
if(document.getElementById(pSrcControl)!=null)
{
document.getElementById(pTargetControlID).value = document.getElementById(pSrcControl).value;
if(parseInt(document.getElementById(pSrcControl).selectedIndex) > 0)
{document.getElementById(pTargetControlText).value = document.getElementById(pSrcControl).options[document.getElementById(pSrcControl).selectedIndex];}
}
}
function ShowHide(pControlID, pValue)
{
HideRowError();
document.getElementById(pControlID).style.display = pValue;
}
function SwitchLink(pSrcControlID, pOriginalTargetControlID, pNewTargetControlID, pOriginalText, pNewText, pHdnControlID)
{
HideRowError();
var control = document.getElementById(pSrcControlID);
var hdnControl = document.getElementById(pHdnControlID);
if(control.innerHTML.toUpperCase() == pNewText.toUpperCase())
{
control.innerHTML = pOriginalText;
ShowHide(pOriginalTargetControlID, 'inline');
ShowHide(pNewTargetControlID, 'none');
if(hdnControl != null)
hdnControl.value = pOriginalText;
}
else
{
control.innerHTML = pNewText;
ShowHide(pOriginalTargetControlID, 'none');
ShowHide(pNewTargetControlID, 'inline');
if(hdnControl != null)
hdnControl.value = pNewText;
}
}
function ShowMoreFields(pLnk, pMaxID, pCurrentID, pDemoID, pValue)
{
HideRowError();
var rowID = pDemoID.substring(0, pDemoID.length-1);
var hdnCurrent = document.getElementById(pCurrentID);
if(((parseInt(hdnCurrent.value)) + 1) != parseInt(document.getElementById(pMaxID).value))
{
hdnCurrent.value = parseInt(hdnCurrent.value) + 1;
ShowHide(rowID + hdnCurrent.value, pValue);
}
else
{
hdnCurrent.value = parseInt(hdnCurrent.value) + 1;
ShowHide(rowID + hdnCurrent.value, pValue);
ShowHide(pLnk, 'none');
}
}
function SetTextBox(pControl, pText)
{
pControl.style.color = '#000000';
pControl.value = pText;
}
function WatermarkTextBox(pControl, pText)
{
pControl.style.color = '#999999';
pControl.value = pText;
}
function FocusTextBox(pControl, pText)
{
pControl.style.color = '#000000';
if(pControl.value.toUpperCase() == pText.toUpperCase())
{
SetTextBox(pControl, '');
}
}
function BlurTextBox(pControl, pText)
{
pControl.style.color = '#999999';
if(pControl.value.length == 0)
{
WatermarkTextBox(pControl, pText);
}
}
function OtherEmails(pControl ,pID)
{
HideRowError();
if(pControl.innerHTML == '[+]')
pControl.innerHTML = '[-]'
else
pControl.innerHTML = '[+]'
var src = document.getElementById(pID + '2');
if(src.style.display == "none")
{
ShowHide(pID + '2', 'inline');
ShowHide(pID + '3', 'inline');
}
else
{
ShowHide(pID + '2', 'none');
ShowHide(pID + '3', 'none');
}
}
function CopySTD(pControl, pNumber)
{
HideRowError();
var dest1 = document.getElementById('txtAddress' + pNumber + 'STD2');
var dest2 = document.getElementById('txtAddress' + pNumber + 'STD3');
dest1.value = pControl.value;
dest2.value = pControl.value;
}
function CopySTDOnError(pControl, pNumber)
{
var src = document.getElementById(pControl);
var dest1 = document.getElementById('txtAddress' + pNumber + 'STD2');
var dest2 = document.getElementById('txtAddress' + pNumber + 'STD3');
if(dest1 != null)
{
dest1.value = src.value;
dest2.value = src.value;
}
}
function CopySTDCodes()
{
var src = document.getElementById(_LblID.substring(0, _LblID.indexOf('lbl')) + 'txtAddress1STD1');
if(src.value.toLowerCase() == 'std')
WatermarkTextBox(src, src.value);
else
SetTextBox(src, src.value);
var dest1 = document.getElementById('txtAddress1STD2');
var dest2 = document.getElementById('txtAddress1STD3');
dest1.value = src.value;
dest2.value = src.value;
var src = document.getElementById(_LblID.substring(0, _LblID.indexOf('lbl')) + 'txtAddress2STD1');
if(src.value.toLowerCase() == 'std')
WatermarkTextBox(src, src.value);
else
SetTextBox(src, src.value);
var dest1 = document.getElementById('txtAddress2STD2');
var dest2 = document.getElementById('txtAddress2STD3');
dest1.value = src.value;
dest2.value = src.value;
var src = document.getElementById(_LblID.substring(0, _LblID.indexOf('lbl')) + 'txtAddress3STD1');
if(src.value.toLowerCase() == 'std')
WatermarkTextBox(src, src.value);
else
SetTextBox(src, src.value);
var dest1 = document.getElementById('txtAddress3STD2');
var dest2 = document.getElementById('txtAddress3STD3');
dest1.value = src.value;
dest2.value = src.value;
}
function ValidateCardFront(pID, pCheckLogo)
{
HideRowError();
var errorID = document.getElementById(_ErrorID);
var lblID = document.getElementById(_LblID);
if(pCheckLogo == true)
{
var dest = document.getElementById(pID + 'upldLogo');
if(dest.value.length > 0)
{
var Index = dest.value.lastIndexOf(".");
if(Index < 1)
{
errorID.style.display = 'block';
lblID.innerHTML = 'The file you are uploading must be an Image file.';
window.scroll(0,250);
return false;
}
var Extension = dest.value.substring(Index + 1);
if(Extension.toLowerCase() != "jpg" && Extension.toLowerCase() != "gif" && Extension.toLowerCase() != "png")
{
errorID.style.display = 'block';
lblID.innerHTML = 'The file you are uploading must be an Image file.';
window.scroll(0,250);
return false;
}
}
}
var dest = document.getElementById(pID + 'txtFBusinessName');
if(dest != null)
{
if(trimAll(dest.value) == "")
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Business Name';
window.scroll(0,250);
return false;
}
}
var dest = document.getElementById(pID + 'txtFName');
if(dest.value.toLowerCase() == "first name" || trimAll(dest.value) == "")
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify First Name';
window.scroll(0,250);
return false;
}
var dest = document.getElementById(pID + 'txtLName');
if(dest.value.toLowerCase() == "last name" || trimAll(dest.value) == "")
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Last Name';
window.scroll(0,250);
return false;
}
errorID.style.display = 'none';
lblID.innerHTML = '';
return true;
}
function ValidateCardBack(pID, pNumber)
{
HideRowError();
var errorID = document.getElementById(_ErrorID);
var lblID = document.getElementById(_LblID);
var dest = document.getElementById(pID + 'txtAddress' + pNumber + 'Address1');
if(dest.disabled == true)
return true;
if(dest.value.toLowerCase() == "address 1" || trimAll(dest.value) == "")
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Address 1';
window.scroll(0,250);
return false;
}
var dest = document.getElementById(pID + 'drpAddress' + pNumber + 'City');
if(dest.value.toLowerCase() == "-1")
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify City';
window.scroll(0,250);
return false;
}
else
{
if(dest.value.toLowerCase() == "0")
{
var dest = document.getElementById(pID + 'txtAddress' + pNumber + 'City');
if(dest.value.toLowerCase() == "city" || trimAll(dest.value) == "")
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify City';
window.scroll(0,250);
return false;
}
}
}
var dest = document.getElementById(pID + 'txtAddress' + pNumber + 'ZipCode');
if(dest.value.toLowerCase() == "zip code" || trimAll(dest.value) == "")
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Zip Code';
window.scroll(0,250);
return false;
}
if(dest.value.length != 6)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Zip Code with exactly 6 digits';
window.scroll(0,250);
return false;
}
var dest = document.getElementById(pID + 'drpAddress' + pNumber + 'State');
if(dest.value.toLowerCase() == "0")
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify State';
window.scroll(0,250);
return false;
}
var dest = document.getElementById(pID + 'txtAddress' + pNumber + 'PhoneNumber1');
if(dest.value.toLowerCase() == "phone # 1" || trimAll(dest.value) == "")
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Phone # 1';
window.scroll(0,250);
return false;
}
errorID.style.display = 'none';
lblID.innerHTML = '';
return true;
}
function HideRowError()
{
var errorID = document.getElementById(_ErrorID);
var successID = document.getElementById(_SuccessID);
if(errorID != null)
{
var lblID = document.getElementById(_LblID);
errorID.style.display = 'none';
lblID.innerHTML = '';
}
if(successID != null)
{
successID.style.display = 'none';
}
}
function checkAll(grid)
{
var Obj=document.getElementById(grid);
for (i=1;i<=Obj.rows.length-1;i++)
{
var chk=Obj.rows[i].cells[0].firstChild;
if (chk.checked==false)
{
chk.checked=true
}
}
return false;
}
function UnchkAll(grid)
{
var Obj=document.getElementById(grid);
for (i=1;i<=Obj.rows.length-1;i++)
{
var chk=Obj.rows[i].cells[0].firstChild;
if (chk.checked==true)
{
chk.checked=false
}
}
return false;
}
function EnableClearAwards(prmAwardName,prmAwardDesc,prmAwardLogo,prmdrpAwardtype,prmdrpagency,prmLnksubmit,prmLnkRemove,prmLnkUpdate,prmimgLogoAward,prmimgLogoAgency,prmuploadAwardsLogo,prmupldAgencyLogo,prmimgLogoAgencyText,prmAgencyName,prmAgencyRemark,prmLabel4,prmPnlAddAgency)
{   
var AwardName = document.getElementById(prmAwardName);
var AwardDesc= document.getElementById(prmAwardDesc);
var AwardLogoText=document.getElementById(prmAwardLogo);
var drpAwardtype=document.getElementById(prmdrpAwardtype);
var drpagency=document.getElementById(prmdrpagency);
var Lnksubmit=document.getElementById(prmLnksubmit);
var LnkRemove=document.getElementById(prmLnkRemove);
var LnkUpdate=document.getElementById(prmLnkUpdate);
var imgLogoAward=document.getElementById(prmimgLogoAward);
var imgLogoAgency=document.getElementById(prmimgLogoAgency);
var uploadAwardsLogo=document.getElementById(prmuploadAwardsLogo);
var upldAgencyLogo=document.getElementById(prmupldAgencyLogo);
var imgLogoAgencyText=document.getElementById(prmimgLogoAgencyText);
var AgencyName=document.getElementById(prmAgencyName);
var AgencyRemark=document.getElementById(prmAgencyRemark);
var Label4=document.getElementById(prmLabel4);
if (Label4.style.display=='none')
{
Label4.style.display='inline';
}
var PnlAddAgency=document.getElementById(prmPnlAddAgency);
PnlAddAgency.style.display = 'none';
AwardName.value='';
AwardName.disabled=false;
AwardDesc.value='';
AwardDesc.disabled=false;
drpAwardtype.value=-1;
drpAwardtype.disabled=false;
drpagency.value=-1;
drpagency.disabled=false;
AgencyName.value='';
AgencyName.disabled=false;
AgencyRemark.value='';
AgencyRemark.disabled=false;
if (Lnksubmit.style.display=='none')
{
Lnksubmit.style.display='inline';
}
if (LnkRemove.style.display=='inline')
{
LnkRemove.style.display='none';
}
if (LnkUpdate.style.display=='inline')
{
LnkUpdate.style.display='none';
}
if (upldAgencyLogo.style.display=='none')
{
upldAgencyLogo.style.display='inline';
}
if (uploadAwardsLogo.style.display=='none')
{
uploadAwardsLogo.style.display='inline';
}
if (AwardLogoText.style.display=='none')
{
AwardLogoText.style.display='inline';
}
if (imgLogoAward.style.display=='inline')
{
imgLogoAward.style.display='none';
}
if (imgLogoAgency.style.display=='inline')
{
imgLogoAgency.style.display='none';
}
if (imgLogoAgencyText.style.display=='none')
{
imgLogoAgencyText.style.display='inline';
}
}
function EnableClearAwards_1(prmAwardName,prmAwardDesc,prmAwardLogo,prmdrpAwardtype,prmdrpagency,prmLnksubmit,prmLnkRemove,prmLnkUpdate,prmimgLogoAward,prmimgLogoAgency,prmuploadAwardsLogo,prmupldAgencyLogo,prmimgLogoAgencyText,prmAgencyName,prmAgencyRemark,prmLabel4,prmPnlAddAgency)
{
var AwardName = document.getElementById(prmAwardName);
var AwardDesc= document.getElementById(prmAwardDesc);
var AwardLogoText=document.getElementById(prmAwardLogo);
var drpAwardtype=document.getElementById(prmdrpAwardtype);
var drpagency=document.getElementById(prmdrpagency);
var Lnksubmit=document.getElementById(prmLnksubmit);
var LnkRemove=document.getElementById(prmLnkRemove);
var LnkUpdate=document.getElementById(prmLnkUpdate);
var imgLogoAward=document.getElementById(prmimgLogoAward);
var imgLogoAgency=document.getElementById(prmimgLogoAgency);
var uploadAwardsLogo=document.getElementById(prmuploadAwardsLogo);
var upldAgencyLogo=document.getElementById(prmupldAgencyLogo);
var imgLogoAgencyText=document.getElementById(prmimgLogoAgencyText);
var AgencyName=document.getElementById(prmAgencyName);
var AgencyRemark=document.getElementById(prmAgencyRemark);
AgencyName.value='';
AgencyName.disabled=false;
AgencyRemark.value='';
AgencyRemark.disabled=false;
var PnlAddAgency=document.getElementById(prmPnlAddAgency);
PnlAddAgency.style.display = 'none';
var Label4=document.getElementById(prmLabel4);
if (Label4.style.display=='none')
{
Label4.style.display='inline';
}
AwardName.value='';
AwardName.disabled=false;
AwardDesc.value='';
AwardDesc.disabled=false;
drpAwardtype.value=-1;
drpAwardtype.disabled=false;    
drpagency.value=-1;
drpagency.disabled=false;
if (Lnksubmit.style.display=='none')
{
Lnksubmit.style.display='inline';
}
if (LnkRemove.style.display=='inline')
{
LnkRemove.style.display='none';
}
if (LnkUpdate.style.display=='inline')
{
LnkUpdate.style.display='none';
}
if (upldAgencyLogo.style.display=='none')
{
upldAgencyLogo.style.display='inline';
}
if (uploadAwardsLogo.style.display=='none')
{
uploadAwardsLogo.style.display='inline';
}
if (imgLogoAward.style.display=='inline')
{
imgLogoAward.style.display='none';
}
if (imgLogoAgency.style.display=='inline')
{
imgLogoAgency.style.display='none';
}
if (AwardLogoText.style.display=='none')
{
AwardLogoText.style.display='inline';
}
if (imgLogoAgencyText.style.display=='none')
{
imgLogoAgencyText.style.display='inline';
}
}
function EnableClearOffering(ProductName,ResourceFile,Industry,uploadFile,prmDisplayName,prmdivHideOnView,prmdivshowOnView,prmLnksubmit,prmLnkRemove,prmLnkUpdate)
{
var obj= document.getElementById(ProductName);
var ResourceText=document.getElementById(ResourceFile);
var lstIndustry=document.getElementById(Industry);
var UploadResourceFile=document.getElementById(uploadFile);
var divHideOnView=document.getElementById(prmdivHideOnView);
var divshowOnView=document.getElementById(prmdivshowOnView);
var DisplayName=document.getElementById(prmDisplayName);
var Lnksubmit=document.getElementById(prmLnksubmit);
var LnkRemove=document.getElementById(prmLnkRemove);
var LnkUpdate=document.getElementById(prmLnkUpdate);
obj.value='';
obj.disabled=false;
ResourceText.value=''
ResourceText.disabled=false;
DisplayName.value='';
UploadResourceFile.value='';
lstIndustry.selectedIndex=-1;
if (divHideOnView.style.display=='none')
{
divHideOnView.style.display='block';
DisplayName.value='';
DisplayName.disabled=false;
}
if (divshowOnView.style.display=='block')
{
divshowOnView.style.display='none';
}
if (Lnksubmit.style.display=='none')
{
Lnksubmit.style.display='inline';
}
if (LnkRemove.style.display=='inline')
{
LnkRemove.style.display='none';
}
if (LnkUpdate.style.display=='inline')
{
LnkUpdate.style.display='none';
}
}
function chkchangePwd(prmOldPwd,prmNewPwd,prmConfirmPwd)
{
HideRowError();
var errorID = document.getElementById(_ErrorID);
var lblID = document.getElementById(_LblID);
var OldPwd= document.getElementById(prmOldPwd);
var NewPwd=document.getElementById(prmNewPwd);
var ConfirmPwd=document.getElementById(prmConfirmPwd);
if ((trimAll(NewPwd.value)).length < 7)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please Specify New Password with atleast 7 chars.';
window.scroll(0,250);
return false;
}
if (trimAll(OldPwd.value)=="")
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please Specify Old Password';
window.scroll(0,250);
return false;
}
if (trimAll(NewPwd.value)=="")
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please Specify New Password';
window.scroll(0,250);
return false;
}
if (trimAll(ConfirmPwd.value)=="")
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please Specify Confirm Password';
window.scroll(0,250);
return false;
}
if (OldPwd.value==NewPwd.value)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Old Password and New Password can not be same';
window.scroll(0,250);
return false;
}
if (NewPwd.value!=ConfirmPwd.value)
{
errorID.style.display = 'block';
lblID.innerHTML = 'New Password and Confirm Password should be same';
window.scroll(0,250);
return false;
}
errorID.style.display = 'none';
lblID.innerHTML = '';
return true;
}
function chkReqEmail(prmOldPrimaryEmail,prmNewPrimaryEmail)
{
HideRowError();
var errorID = document.getElementById(_ErrorID);
var lblID = document.getElementById(_LblID);
var OldPrimaryEmail = document.getElementById(prmOldPrimaryEmail);
var NewPrimaryEmail= document.getElementById(prmNewPrimaryEmail);
if (trimAll(NewPrimaryEmail.value)=="")
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please Specify New Primary Email';
window.scroll(0,250);
return false;
}
if (OldPrimaryEmail.value==NewPrimaryEmail.value)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Old Primary Email and New Primary Email can not be same';
window.scroll(0,250);
return false;
}
var reEmail = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
if(reEmail.test(NewPrimaryEmail.value)!=true)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please enter a valid Primary Email';
window.scroll(0,250);
return false;
}
errorID.style.display = 'none';
lblID.innerHTML = '';
return true;
}
function chkRequiredPartnerDetails(ProductName,ResourceFile,uploadFile,prmdrpPromo)
{
HideRowError();
var errorID = document.getElementById(_ErrorID);
var lblID = document.getElementById(_LblID);
var obj= document.getElementById(ProductName);
var ResourceText=document.getElementById(ResourceFile);
var UploadResourceFile=document.getElementById(uploadFile);
var drpPromo=document.getElementById(prmdrpPromo);
if (drpPromo.value==-1)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please select Partner Program';
window.scroll(0,250);
return false;
}
if (drpPromo.value==0)
{
if(trimAll(obj.value) == '')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Partner Program Name';
window.scroll(0,250);
return false;
}
if(trimAll(ResourceText.value) == '')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Agency/Company Name';
window.scroll(0,250);
return false;
}
if (UploadResourceFile.value=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please upload Partner Program Logo';
window.scroll(0,250);
return false;
}
var dest=document.getElementById(uploadFile);
if(dest.value.length > 0)
{
var Index = dest.value.lastIndexOf(".");
if(Index < 1)
{
alert('The file you are uploading must be an Image file.');
dest.focus();
return false;
}
var Extension = dest.value.substring(Index + 1);
if(Extension.toLowerCase() != "jpg" && Extension.toLowerCase() != "gif" && Extension.toLowerCase() != "png")
{
alert('The file you are uploading must be an Image file.');
dest.focus();
return false;
}
}
}
errorID.style.display = 'none';
lblID.innerHTML = '';
return true;
}
function chkRequiredProductName(ProductName,ResourceFile,Industry,uploadFile,prmbtnUpdate,prmDisplayName)
{
HideRowError();
var errorID = document.getElementById(_ErrorID);
var lblID = document.getElementById(_LblID);
var obj= document.getElementById(ProductName);
var ResourceText=document.getElementById(ResourceFile);
var lstIndustry=document.getElementById(Industry);
var UploadResourceFile=document.getElementById(uploadFile);
var btnUpdate=document.getElementById(prmbtnUpdate);
var DisplayName=document.getElementById(prmDisplayName);
if(trimAll(obj.value) == '')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Product Name';
window.scroll(0,250);
return false;
}
if(trimAll(ResourceText.value) == '')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Product Description';
window.scroll(0,250);
return false;
}
if (btnUpdate.style.display=='none')
{
if (UploadResourceFile.value=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please upload Product Resource file';
window.scroll(0,250);
return false;
}
}
if(trimAll(DisplayName.value) == '')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Product Display Name';
window.scroll(0,250);
return false;
}
if (lstIndustry.selectedIndex==-1)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please select an Industry';
window.scroll(0,250);
return false;
}
errorID.style.display = 'none';
lblID.innerHTML = '';
return true;
}
function chkRequiredAwards(prmAwardName,prmAwardDesc,prmAwardLogo,prmdrpAwardtype,prmdrpagency,prmbtnUpdate)
{
HideRowError();
var errorID = document.getElementById(_ErrorID);
var lblID = document.getElementById(_LblID);
var AwardName = document.getElementById(prmAwardName);
var AwardDesc= document.getElementById(prmAwardDesc);
var AwardLogo=document.getElementById(prmAwardLogo);
var drpAwardtype=document.getElementById(prmdrpAwardtype);
var drpagency=document.getElementById(prmdrpagency);
var btnUpdate=document.getElementById(prmbtnUpdate);
if(trimAll(AwardName.value) == '')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Award Name';
window.scroll(0,250);
return false;
}
if(trimAll(AwardDesc.value) == '')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Award Description';
window.scroll(0,250);
return false;
}
if (btnUpdate.style.display=='none')
{
if (AwardLogo.value=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please upload Awards Logo';
window.scroll(0,250);
return false;
}
}
var dest=document.getElementById(prmAwardLogo);
if(dest.value.length > 0)
{
var Index = dest.value.lastIndexOf(".");
if(Index < 1)
{
alert('The file you are uploading must be an Image file.');
dest.focus();
return false;
}
var Extension = dest.value.substring(Index + 1);
if(Extension.toLowerCase() != "jpg" && Extension.toLowerCase() != "gif" && Extension.toLowerCase() != "png")
{
alert('The file you are uploading must be an Image file.');
dest.focus();
return false;
}
}
if(drpAwardtype.value == -1)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please Select Award Type';
window.scroll(0,250);
return false;
}
if(drpagency.value == -1)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please Select Agency';
window.scroll(0,250);
return false;
}
errorID.style.display = 'none';
lblID.innerHTML = '';
return true;
}
function chkRequiredBusinessName(BusinessName,Industry,Other,pImgLogo,type)
{
HideRowError();
var errorID = document.getElementById(_ErrorID);
var lblID = document.getElementById(_LblID);
var obj= document.getElementById(BusinessName);
var objIndustry= document.getElementById(Industry);
if (type=='R')
{
var dest=document.getElementById(pImgLogo);
if(dest.value.length > 0)
{
var Index = dest.value.lastIndexOf(".");
if(Index < 1)
{
alert('The file you are uploading must be an Image file.');
dest.focus();
return false;
}
var Extension = dest.value.substring(Index + 1);
if(Extension.toLowerCase() != "jpg" && Extension.toLowerCase() != "gif" && Extension.toLowerCase() != "png")
{
alert('The file you are uploading must be an Image file.');
dest.focus();
return false;
}
}
}
if(trimAll(obj.value) == '')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Business Name';
window.scroll(0,250);
return false;
}
if (objIndustry.value==-1)
{   
errorID.style.display = 'block';
lblID.innerHTML = 'Please select Industry';
window.scroll(0,250);
return false;
}
if (objIndustry.value==0)
{
var objOther=document.getElementById(Other);
if (trimAll(objOther.value)=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Industry';
window.scroll(0,250);
return false;
}
}
errorID.style.display = 'none';
lblID.innerHTML = '';
return true;
}
function SwitchSMBImages(pNumber, pCase)
{
document.getElementById('SMBStep1').style.display = 'none';
document.getElementById('SMBStep2').style.display = 'none';
document.getElementById('SMBStep3').style.display = 'none';
document.getElementById('imgSMBStep1').src = 'http://bxindia.intel.com/images/plus.gif';
document.getElementById('imgSMBStep2').src = 'http://bxindia.intel.com/images/plus.gif';
document.getElementById('imgSMBStep3').src = 'http://bxindia.intel.com/images/plus.gif';
switch(pNumber)
{
case 1:
document.getElementById('imgSMBStep1').src = 'http://bxindia.intel.com/images/minus.gif';
document.getElementById('SMBStep1').style.display = 'block';
break;
case 2:
document.getElementById('imgSMBStep2').src = 'http://bxindia.intel.com/images/minus.gif';
document.getElementById('SMBStep2').style.display = 'block';
break;
case 3:
document.getElementById('imgSMBStep3').src = 'http://bxindia.intel.com/images/minus.gif';
document.getElementById('SMBStep3').style.display = 'block';
break;
}
}
function SwitchResellerImages(pNumber, pCase)
{
document.getElementById('ResellerStep1').style.display = 'none';
document.getElementById('ResellerStep2').style.display = 'none';
document.getElementById('ResellerStep3').style.display = 'none';
try{document.getElementById('ResellerStep4').style.display = 'none';}catch(e4){}
try{document.getElementById('ResellerStep5').style.display = 'none';}catch(e5){}
document.getElementById('imgResellerStep1').src = 'http://bxindia.intel.com/images/plus.gif';
document.getElementById('imgResellerStep2').src = 'http://bxindia.intel.com/images/plus.gif';
document.getElementById('imgResellerStep3').src = 'http://bxindia.intel.com/images/plus.gif';
try{document.getElementById('imgResellerStep4').src = 'http://bxindia.intel.com/images/plus.gif';}catch(i4){}
try{document.getElementById('imgResellerStep5').src = 'http://bxindia.intel.com/images/plus.gif';}catch(i5){}
switch(pNumber)
{
case 1:
document.getElementById('imgResellerStep1').src = 'http://bxindia.intel.com/images/minus.gif';
document.getElementById('ResellerStep1').style.display = 'block';
break;
case 2:
document.getElementById('imgResellerStep2').src = 'http://bxindia.intel.com/images/minus.gif';
document.getElementById('ResellerStep2').style.display = 'block';
break;
case 3:
document.getElementById('imgResellerStep3').src = 'http://bxindia.intel.com/images/minus.gif';
document.getElementById('ResellerStep3').style.display = 'block';
break;
case 4:
try
{
document.getElementById('imgResellerStep4').src = 'http://bxindia.intel.com/images/minus.gif';
document.getElementById('ResellerStep4').style.display = 'block';
}
catch(ee4)
{
}
break;
case 5:
try
{
document.getElementById('imgResellerStep5').src = 'http://bxindia.intel.com/images/minus.gif';
document.getElementById('ResellerStep5').style.display = 'block';
}
catch(ee5)
{
}
break;
}
}
function ExpandSMBFromCode(pNumber)
{
switch(pNumber)
{
case 1:
SwitchSMBImages(1, 1);
break;
case 2:
SwitchSMBImages(2, 1);
try{setTimeout('document.getElementById(\'tabBusinessInformation\').tabber.tabShow(0)', 1000)}catch(e){}
break;
case 22:
SwitchSMBImages(2, 1);
try{setTimeout('document.getElementById(\'tabBusinessInformation\').tabber.tabShow(1)', 1000)}catch(e){}
break;
case 23:
SwitchSMBImages(2, 1);
try{setTimeout('document.getElementById(\'tabBusinessInformation\').tabber.tabShow(2)', 1000)}catch(e){}
break;
case 3:
SwitchSMBImages(3, 1);
break;
}
}
function ExpandResellerFromCode(pNumber)
{
switch(pNumber)
{
case 1:
SwitchResellerImages(1, 1);
break;
case 21:
SwitchResellerImages(2, 1);
try{setTimeout('document.getElementById(\'tabBusinessInformation\').tabber.tabShow(0)', 1000)}catch(e){}
break;
case 22:
SwitchResellerImages(2, 1);
try{setTimeout('document.getElementById(\'tabBusinessInformation\').tabber.tabShow(1)', 1000)}catch(e){}
break;
case 23:
SwitchResellerImages(2, 1);
try{setTimeout('document.getElementById(\'tabBusinessInformation\').tabber.tabShow(2)', 1000)}catch(e){}
break;
case 3:
SwitchResellerImages(3, 1);
break;
case 4:
SwitchResellerImages(4, 1);
break;
case 5:
SwitchResellerImages(5, 1);
break;
}
}
function ExpandBackFromCode(pNumber)
{
document.getElementById('AddressTopper').style.display = 'none';
document.getElementById(_ErrorID.replace('rowError', '') + 'pnlAddress2Details').style.display = 'none';
document.getElementById(_ErrorID.replace('rowError', '') + 'pnlAddress3Details').style.display = 'none';
switch(pNumber)
{
case 1:
document.getElementById('AddressTopper').style.display = 'block';
break;
case 2:
document.getElementById(_ErrorID.replace('rowError', '') + 'pnlAddress2Details').style.display = 'block';
break;
case 3:
document.getElementById(_ErrorID.replace('rowError', '') + 'pnlAddress3Details').style.display = 'block';
break;
}
}
function ShowVerifyBox(obj)
{
var divVerifyBox = document.getElementById('divVerify');
divVerifyBox.x = getposOffset(obj, "left");
divVerifyBox.style.left = divVerifyBox.x + 'px';
divVerifyBox.style.display = 'block';
}
function HideVerifyBox()
{
var divVerifyBox = document.getElementById('divVerify');
divVerifyBox.style.display = 'none';
}
var horizontal_offset="9px";
var vertical_offset="0";
var ie=document.all;
var ns6=document.getElementById&&!document.all;
function getposOffset(what, offsettype)
{
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null)
{
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}
function iecompattest()
{
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
function clearbrowseredge(obj, whichedge)
{
var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1;
if (whichedge=="rightedge")
{
var windowedge=ie && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-30 : window.pageXOffset+window.innerWidth-40;
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth;
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth+parseInt(horizontal_offset);
}
else
{
var windowedge=ie && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18;
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight;
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight;
}
return edgeoffset;
}
function showhint(menucontents, obj, e, tipwidth)
{
if ((ie||ns6) && document.getElementById("hintbox"))
{
dropmenuobj=document.getElementById("hintbox");
dropmenuobj.innerHTML=menucontents;
dropmenuobj.style.left=dropmenuobj.style.top=-500;
if (tipwidth!="")
{
dropmenuobj.widthobj=dropmenuobj.style;
dropmenuobj.widthobj.width=tipwidth;
}
dropmenuobj.x=getposOffset(obj, "left");
dropmenuobj.y=getposOffset(obj, "top");
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+"px";
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px";
dropmenuobj.style.visibility="visible";
obj.onmouseout=hidetip;
}
}
function hidetip(e)
{
dropmenuobj.style.visibility="hidden";
dropmenuobj.style.left="-500px";
}
function createhintbox()
{
var divblock=document.createElement("div");
divblock.setAttribute("id", "hintbox");
document.body.appendChild(divblock);
}
function chkRequiredSolutionName(prmdrpSolutionCategory,prmRdbtnCS,prmRdbtnEX,prmRdbtnEN,prmrdBtnYes,prmrdBtnNo,prmSolutionName,prmSolutionDescription,prmSolutionBenefits,ptxtCategoryName,plblSolutionCategory,plblCatgName, plblrdbtn, plblENHdnSolutions,plblEXHdnSolutions,plblrdBtnEX,plblSolutionName,plblSolutionDescription,plblSolutionBenefits)
{
HideRowError();
var errorID = document.getElementById(_ErrorID);
var lblID = document.getElementById(_LblID);
var drpSolutionCategory= document.getElementById(prmdrpSolutionCategory);
var RdbtnCS=document.getElementById(prmRdbtnCS);
var RdbtnEX=document.getElementById(prmRdbtnEX);
var RdbtnEN=document.getElementById(prmRdbtnEN);
var rdBtnYes=document.getElementById(prmrdBtnYes);
var rdBtnNo=document.getElementById(prmrdBtnNo);
var SolutionName=document.getElementById(prmSolutionName);
var SolutionDescription=document.getElementById(prmSolutionDescription);
var SolutionBenefits=document.getElementById(prmSolutionBenefits);
var txtCategoryName=document.getElementById(ptxtCategoryName);
var lblSolutionCategory=document.getElementById(plblSolutionCategory);
var lblCatgName=document.getElementById(plblCatgName);
var lblrdbtn=document.getElementById(plblrdbtn);
var lblENHdnSolutions=document.getElementById(plblENHdnSolutions);
var lblEXHdnSolutions=document.getElementById(plblEXHdnSolutions);
var lblrdBtnEX=document.getElementById(plblrdBtnEX);    
var lblSolutionName=document.getElementById(plblSolutionName);
var lblSolutionDescription=document.getElementById(plblSolutionDescription);
var lblSolutionBenefits=document.getElementById(plblSolutionBenefits);
if(drpSolutionCategory.value == -1)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please provide all mandatory data before continuing';
lblSolutionCategory.style.display = 'inline';
lblCatgName.style.display = 'none';
lblrdbtn.style.display = 'none';
lblENHdnSolutions.style.display = 'none';
lblEXHdnSolutions.style.display = 'none';
lblrdBtnEX.style.display = 'none';
lblSolutionName.style.display = 'none';
lblSolutionDescription.style.display = 'none';
lblSolutionBenefits.style.display = 'none';
window.scroll(0,250);
return false;
}
var selectedIndex=drpSolutionCategory.selectedIndex;
if (drpSolutionCategory.options[selectedIndex].text.indexOf('(IBX)') != -1)
{
if(RdbtnCS.checked == false && RdbtnEX.checked == false && RdbtnEN.checked == false)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please provide all mandatory data before continuing';
lblSolutionCategory.style.display = 'none';
lblCatgName.style.display = 'none';
lblrdbtn.style.display = 'inline';
lblENHdnSolutions.style.display = 'none';
lblEXHdnSolutions.style.display = 'none';
lblrdBtnEX.style.display = 'none';
lblSolutionName.style.display = 'none';
lblSolutionDescription.style.display = 'none';
lblSolutionBenefits.style.display = 'none';
window.scroll(0,250);
return false;
}
if (RdbtnEX.checked==true)
{
if(rdBtnYes.checked == false && rdBtnNo.checked == false)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please provide all mandatory data before continuing';
lblSolutionCategory.style.display = 'none';
lblCatgName.style.display = 'none';
lblrdbtn.style.display = 'none';
lblENHdnSolutions.style.display = 'none';
lblEXHdnSolutions.style.display = 'none';
lblrdBtnEX.style.display = 'inline';
lblSolutionName.style.display = 'none';
lblSolutionDescription.style.display = 'none';
lblSolutionBenefits.style.display = 'none';
window.scroll(0,250);
return false;
}
}
}
else
{
if(drpSolutionCategory.value == 0)
{
if (trimAll(txtCategoryName.value)=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please provide all mandatory data before continuing';
lblSolutionCategory.style.display = 'none';
lblCatgName.style.display = 'inline';
lblrdbtn.style.display = 'none';
lblENHdnSolutions.style.display = 'none';
lblEXHdnSolutions.style.display = 'none';
lblrdBtnEX.style.display = 'none';
lblSolutionName.style.display = 'inline';
lblSolutionDescription.style.display = 'inline';
lblSolutionBenefits.style.display = 'inline';
window.scroll(0,250);
return false;
}
}
}
if (RdbtnEX.checked==false)
{
if (trimAll(SolutionName.value)=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please provide all mandatory data before continuing';
lblSolutionCategory.style.display = 'none';
lblCatgName.style.display = 'none';
lblrdbtn.style.display = 'none';
lblENHdnSolutions.style.display = 'none';
lblEXHdnSolutions.style.display = 'none';
lblrdBtnEX.style.display = 'none';
if (trimAll(SolutionName.value)=='')
{
lblSolutionName.style.display = 'inline';}
else
{lblSolutionName.style.display = 'none';
}
if (trimAll(SolutionDescription.value)=='')
{lblSolutionDescription.style.display = 'inline';}
else{lblSolutionDescription.style.display = 'none';}
if (trimAll(SolutionBenefits.value)=='')
{
lblSolutionBenefits.style.display = 'inline';
}
else
{
lblSolutionBenefits.style.display = 'none';
}
window.scroll(0,250);
return false;
}
if (trimAll(SolutionDescription.value)=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please provide all mandatory data before continuing';
lblSolutionCategory.style.display = 'none';
lblCatgName.style.display = 'none';
lblrdbtn.style.display = 'none';
lblENHdnSolutions.style.display = 'none';
lblEXHdnSolutions.style.display = 'none';
lblrdBtnEX.style.display = 'none';
if (trimAll(SolutionName.value)=='')
{
lblSolutionName.style.display = 'inline';}
else
{lblSolutionName.style.display = 'none';
}
if (trimAll(SolutionDescription.value)=='')
{lblSolutionDescription.style.display = 'inline';}
else{lblSolutionDescription.style.display = 'none';}
if (trimAll(SolutionBenefits.value)=='')
{
lblSolutionBenefits.style.display = 'inline';
}
else
{
lblSolutionBenefits.style.display = 'none';
}
window.scroll(0,250);
return false;
}
if (trimAll(SolutionBenefits.value)=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please provide all mandatory data before continuing';
lblSolutionCategory.style.display = 'none';
lblCatgName.style.display = 'none';
lblrdbtn.style.display = 'none';
lblENHdnSolutions.style.display = 'none';
lblEXHdnSolutions.style.display = 'none';
lblrdBtnEX.style.display = 'none';
if (trimAll(SolutionName.value)=='')
{
lblSolutionName.style.display = 'inline';}
else
{lblSolutionName.style.display = 'none';
}
if (trimAll(SolutionDescription.value)=='')
{lblSolutionDescription.style.display = 'inline';}
else{lblSolutionDescription.style.display = 'none';}
if (trimAll(SolutionBenefits.value)=='')
{
lblSolutionBenefits.style.display = 'inline';
}
else
{
lblSolutionBenefits.style.display = 'none';
}
window.scroll(0,250);
return false;
}
} 
errorID.style.display = 'none';
lblID.innerHTML = '';
return true;
}
function chkreqResource(prmDisplayName,Resourcefile,prmDrpResourceType,prmTxtOther,pUpload,pResourceDiplay,pLblOther)
{
HideRowError();
var errorID = document.getElementById(_ErrorID);
var lblID = document.getElementById(_LblID);
var DisplayName=document.getElementById(prmDisplayName);
var ResourceFile=document.getElementById(Resourcefile);
var DrpResourceType=document.getElementById(prmDrpResourceType);
var TxtOther=document.getElementById(prmTxtOther);
var Upload=document.getElementById(pUpload);
var ResourceDiplay=document.getElementById(pResourceDiplay);
var LblOther=document.getElementById(pLblOther);
if (ResourceFile.value=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please upload file';
Upload.style.display = 'inline';
if (trimAll(DisplayName.value)=='')
{
ResourceDiplay.style.display = 'inline';
}
else
{
ResourceDiplay.style.display = 'none';
}
window.scroll(0,250);
return false;
}
if (trimAll(DisplayName.value)=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Resource Display Name';
ResourceDiplay.style.display = 'inline';
if (ResourceFile.value=='')
{
Upload.style.display = 'inline';
}
else
{
Upload.style.display = 'none';
}
window.scroll(0,250);
return false;
} 
var selectedIndex = DrpResourceType.selectedIndex; 
if(DrpResourceType.options[selectedIndex].text=='Other')   
{
if (trimAll(TxtOther.value)=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Resource Type';
LblOther.style.display = 'inline';
if (ResourceFile.value=='')
{
Upload.style.display = 'inline';
}
else
{
Upload.style.display = 'none';
}
if (trimAll(DisplayName.value)=='')
{
ResourceDiplay.style.display = 'inline';
window.scroll(0,250);
return false;
}
else
{
ResourceDiplay.style.display = 'none';
}
}
}
errorID.style.display = 'none';
lblID.innerHTML = '';
return true;
}
function chkReqAddress(prmAddress1,prmDrpcity,prmCityOther,prmZipCode,prmDrpState,prmStd1,prmPhoneNo1,prmExtension1)
{
HideRowError();
var errorID = document.getElementById(_ErrorID);
var lblID = document.getElementById(_LblID);
var Address1=document.getElementById(prmAddress1);
var Drpcity=document.getElementById(prmDrpcity);
var CityOther=document.getElementById(prmCityOther);
var DrpState=document.getElementById(prmDrpState);
var Std1=document.getElementById(prmStd1);
var PhoneNo1=document.getElementById(prmPhoneNo1);
var Extension1=document.getElementById(prmExtension1);
var ZipCode=document.getElementById(prmZipCode);
if (Address1.disabled==false)
{
if (trimAll(Address1.value)=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify address1';
window.scroll(0,250);
return false;
}
if (DrpState.value==0)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please select State';
window.scroll(0,250);
return false;
}
if (Drpcity.value==-1)
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please select city';
window.scroll(0,250);
return false;
}
if (Drpcity.value==0)
{
if(trimAll(CityOther.value)=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify city';
window.scroll(0,250);
return false;
}
}
if (trimAll(ZipCode.value)=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify ZipCode';
window.scroll(0,250);
return false;
}
if (ZipCode.value.length!=6)
{
errorID.style.display = 'block';
lblID.innerHTML = 'ZipCode must be of 6 digits';
window.scroll(0,250);
return false;
}
if (trimAll(PhoneNo1.value)=='')
{
errorID.style.display = 'block';
lblID.innerHTML = 'Please specify Phone # 1';
window.scroll(0,250);
return false;
}
errorID.style.display = 'none';
lblID.innerHTML = '';
return true;
}
}
function chkforMenuitem(prmdrpSolutionCategory,prmRdbtnCS,prmRdbtnEX,prmRdbtnEN,prmrdBtnYes,prmrdBtnNo,prmSolutionName,prmSolutionDescription,prmSolutionBenefits,prmMenuItem1,solid)
{
return false;
if(solid==0)
{
var MenuItem1 = document.getElementById(prmMenuItem1);
if (MenuItem1.src.indexOf('http://bxindia.intel.com/images/SolutionBasicOn.gif') >0)
{
return chkRequiredSolutionName(prmdrpSolutionCategory,prmRdbtnCS,prmRdbtnEX,prmRdbtnEN,prmrdBtnYes,prmrdBtnNo,prmSolutionName,prmSolutionDescription,prmSolutionBenefits)
}
else
{
return true;
}
}
}
function chkMenuSelection(objmenu1,prmHhdnSetValue)
{
var HhdnSetValue = document.getElementById(prmHhdnSetValue); 
var menu1=document.getElementById(objmenu1);
if (menu1.src.indexOf('http://bxindia.intel.com/images/SolutionBasicOn.gif') > 0)
{
return false;
}
else
{  
HhdnSetValue.value=0;
return false;
}
}
function trimAll(sString) 
{
while (sString.substring(0,1) == ' ')
{
sString = sString.substring(1, sString.length);
}
while (sString.substring(sString.length-1, sString.length) == ' ')
{
sString = sString.substring(0,sString.length-1);
}
return sString;
}
function CopySTDForAddress(pControl, txtAddress3STD2,txtAddress3STD3)
{
HideRowError();
var dest1 = document.getElementById(txtAddress3STD2);
var dest2 = document.getElementById(txtAddress3STD3);
dest1.value = pControl.value;
dest2.value = pControl.value;
}
function CopySTDCodesForAddress(txtAddress3STD2,txtAddress3STD3)
{
var src = document.getElementById(_LblID.substring(0, _LblID.indexOf('lbl')) + 'txtAddress3STD1');
if(src.value.toLowerCase() == 'std')
WatermarkTextBox(src, src.value);
else
SetTextBox(src, src.value);
var dest1 = document.getElementById(txtAddress3STD2);
var dest2 = document.getElementById(txtAddress3STD3);
dest1.value = src.value;
dest2.value = src.value;
}
function CopySTDCodesForAnoAddress(txtAddress3STD2,txtAddress3STD3)
{
var src = document.getElementById(_LblID.substring(0, _LblID.indexOf('lbl')) + 'txtEditAddress3STD1');
if(src.value.toLowerCase() == 'std')
WatermarkTextBox(src, src.value);
else
SetTextBox(src, src.value);
var dest1 = document.getElementById(txtAddress3STD2);
var dest2 = document.getElementById(txtAddress3STD3);
dest1.value = src.value;
dest2.value = src.value;
}
function chkalertAll(grid)
{
var result=false;
var Obj=document.getElementById(grid);
for (i=1;i<=Obj.rows.length-1;i++)
{
var chk=Obj.rows[i].cells[0].firstChild;
if (chk.checked==true)
{
result=true;
}
}
if(result==true)
{
return confirm('Are you sure you want to delete these record?');
}
else
{
return false;}
}
if (window.addEventListener)
window.addEventListener("load", createhintbox, false);
else if (window.attachEvent)
window.attachEvent("onload", createhintbox);
else if (document.getElementById)
window.onload=createhintbox;