/**<last_modified="2008-03-26" >***/
function printResize(){
 window.resizeTo('800', '600');
}
function getRandom(min, max)
{
   max++;   //add one to the max number specified so that the specified value can actually be returned
   range = max - min;
   now = new Date();
   seed = now.getSeconds();
   randomNumber = Math.random(seed);         //get a random number between 0 & 1
   randomNumber = randomNumber * range;      //convert this to a random number between 0 & range
   roundedNumber = Math.round(randomNumber); //round the number off to an integer (down if less than .5, up if greater than)
   if (roundedNumber == range)
      {roundedNumber = 0;}
   roundedNumber = roundedNumber + min;

   return roundedNumber
}

function showPopupOnce(popupTitle, chance, wUrl, wWindowName, wWidth, wHeight, wTop, wLeft, wDirectories, wLocation, wMenubar, wScrollbars, wStatus, wToolbar, wResizable) {

   if (chance<100)
   {
      num = getRandom(0, 100);
      if (num > chance) return false;
   }

	if (GetCookie("seenpopup" + popupTitle) == 'true') return true;

	var expires = new Date();
	expires.setTime(expires.getTime() + 3E11);

   SetCookie("seenpopup" + popupTitle, true, expires, "");
   openAnyWinTwo(wUrl, wWindowName, wWidth, wHeight, wTop, wLeft, wDirectories, wLocation, wMenubar, wScrollbars, wStatus, wToolbar, wResizable);

	return true;
}

function showPopup(chance, wUrl, wWindowName, wWidth, wHeight, wTop, wLeft, wDirectories, wLocation, wMenubar, wScrollbars, wStatus, wToolbar, wResizable) {

   if (chance<100)
   {
      num = getRandom(0, 100);
      if (num > chance) return false;
   }

   openAnyWinTwo(wUrl, wWindowName, wWidth, wHeight, wTop, wLeft, wDirectories, wLocation, wMenubar, wScrollbars, wStatus, wToolbar, wResizable);
	return true;
}

function SetChildOpenerNull(win)
{
  wind = eval(win);
  wind.opener = null;
}
function openInParent2(url)
{
   if(window.opener && !window.opener.closed){
      var parentWin = window.opener;
      parentWin.location.href = url;
      parentWin.focus();
      window.close();
   } else {
      now = new Date();
      var winName = 'window' + now.getHours() + now.getMinutes() + now.getSeconds();
      openAnyWinTwo(url,winName,800,600,0,0,0,1,1,1,1,1,1);
      window.close();
   }
}
function openAnyWinTwo (wUrl, wWindowName, wWidth, wHeight, wTop, wLeft, wDirectories, wLocation, wMenubar, wScrollbars, wStatus, wToolbar, wResizable)
{
var features= 'width='        + wWidth +
              ',height='      + wHeight +
              ',top='        + wTop +
              ',left='      + wLeft +
              ',directories=' + wDirectories +
              ',location='    + wLocation +
              ',menubar='     + wMenubar +
              ',scrollbars='  + wScrollbars +
              ',status='      + wStatus +
              ',toolbar='     + wToolbar +
              ',resizable='   + wResizable;
window.open (wUrl, wWindowName, features);
}

function openAnyWin (wUrl, wWindowName, wWidth, wHeight, wDirectories, wLocation, wMenubar, wScrollbars, wStatus, wToolbar, wResizable)
{
var features= 'width='        + wWidth +
              ',height='      + wHeight +
              ',directories=' + wDirectories +
              ',location='    + wLocation +
              ',menubar='     + wMenubar +
              ',scrollbars='  + wScrollbars +
              ',status='      + wStatus +
              ',toolbar='     + wToolbar +
              ',resizable='   + wResizable;
window.open (wUrl, wWindowName, features);
}
function writebannerimage(sitetype) {
  if (sitetype == "msf" || sitetype == "msd") {
    bannerurl = statichost + "/static/global/fwimgs/" + sitetype + "_banner.jpg";
    document.write("<img src='" + bannerurl + "' border=\"0\" width=\"480\" height=\"101\">");
  } else if(sitetype == "nam") {
    bannerurl = statichost + "/static/global/fwimgs/" + sitetype + "_banner_37by306.gif";
    document.write("<IMG SRC='" + bannerurl + "' border=\"0\" width=\"306\" height=\"37\">");
 }
}

function writeCurve(sitetype) {
   var curveImage = statichost + "/static/global/fwimgs/" + sitetype + "_curve.gif";
   var curveTile = statichost + "/static/global/fwimgs/" + sitetype + "_curve_tile.gif";
   document.write("<td colspan=\"3\" background=\"" + curveTile + "\"><img src=\"" + curveImage + "\" alt=\"\" width=\"409\" height=\"6\"></img></td>");
}

function jumpto2(url) {
	if (url == "" || url == "no_jump") {
	   return;
	}
	top.location = url;
}

function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function FixCookieDate (date) {
  var base = new Date(0);
  var skew = base.getTime(); // dawn of (Unix) time - should be 0
  if (skew > 0)  // Except on the Mac - ahead of its time
    date.setTime (date.getTime() - skew);
}

function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return null;
}

function SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}

function DeleteCookie (name,path,domain) {
  if (GetCookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}

function HandleSubscription1 () {
  openAnyWinTwo("", "ShellSubscriptionWindow", 490, 300, 168, 152, 0, 0, 0, 0, 0, 0, 0);
  window.document.SubscriptionForm.referringPage.value = location.href;
  window.document.SubscriptionForm.shellCookie.value = GetCookie("SHELL.COM");
  return true;
}

function HandleSubscription2 () {
  HandleSubscription1();
  window.document.SubscriptionForm.submit();
}

function setSecureSearchVarsAndSubmit(theForm) {
   setSecureSearchVars(theForm);
   theForm.submit();
}

function setSecureSearchVars(theForm) {
   var strFC2 = "";
   var strFC3 = "";
   var url = window.location.href;
   regex = new RegExp("FC2=\.+");
   matches = url.match(regex);
   if (matches == null) {
      strFC2 = "";
   } else {
      strFC2 = matches[0];
      if (strFC2 == "FC2=") {
         strFC2 = "";
      } else {
         // Loose the "FC2=" from the start of the string.
         strFC2 = strFC2.substring(4);
         // Get rid of any parameters that follow this one.
         if (strFC2.indexOf('&') != -1) {
            strFC2 = strFC2.substring(0, strFC2.indexOf('&'));
         }
      }
   }
	theForm.FC2.value = strFC2;
	
	regex = new RegExp("FC3=\.+");
   matches = url.match(regex);
   if (matches == null) {
      strFC3 = "";
   } else {
      strFC3 = matches[0];
      if (strFC3 == "FC3=") {
         strFC3 = "";
      } else {
         strFC3 = strFC3.substring(4);
         if (strFC3.indexOf('&') != -1) {
            strFC3 = strFC3.substring(0, strFC3.indexOf('&'));
         }
      }
   }
	theForm.FC3.value = strFC3;
}

function shell_sage_ev(intType, strURL, strSourceSiteID){
}
function shell_sage_openAnyWinTwo(intType, strSourceSiteID, strURL, wWindowName, wWidth, wHeight, wTop, wLeft, wDirectories, wLocation, wMenubar, wScrollbars, wStatus, wToolbar, wResizable){
openAnyWinTwo(strURL, wWindowName, wWidth, wHeight, wTop, wLeft, wDirectories, wLocation, wMenubar, wScrollbars, wStatus, wToolbar, wResizable);
}

//**********************************

function ShowHide(name)
{
	//alert(name);

	if (document.ttfrm.rbModel[0].checked) {
		document.ttfrm.btnCalculate.disabled = true;
/*
		document.ttfrm.txtDayAmt.style.backgroundColor="#ffffff";
		document.ttfrm.txtDayAmt.readOnly = false;
		document.ttfrm.txtMntAmt.style.backgroundColor="#ffffff";
		document.ttfrm.txtMntAmt.readOnly = false;
*/
	}

	if (document.ttfrm.rbModel[1].checked && name=='click') {
		document.ttfrm.btnCalculate.disabled = false;
	}


	if (document.ttfrm.rbModel[1].checked && name!='click' && document.ttfrm.hdnAmount.value=="1") {

		document.ttfrm.HiddenSelection.value = name;
		
		if (name=="day")
		{
			document.ttfrm.txtDayAmt.style.backgroundColor="#ffffff";
			document.ttfrm.txtDayAmt.readOnly = false;
			
			document.ttfrm.txtWeekAmt.style.backgroundColor = "#dcdcdc";
			document.ttfrm.txtWeekAmt.value = ""
			document.ttfrm.txtWeekAmt.readOnly = true;

			document.ttfrm.txtMntAmt.style.backgroundColor = "#dcdcdc";
			document.ttfrm.txtMntAmt.value = ""
			document.ttfrm.txtMntAmt.readOnly = true;	
		}
		
		if (name=="week")
		{
			document.ttfrm.txtWeekAmt.style.backgroundColor="#ffffff";
			document.ttfrm.txtWeekAmt.readOnly = false;
			
			document.ttfrm.txtDayAmt.style.backgroundColor = "#dcdcdc";
			document.ttfrm.txtDayAmt.value = ""
			document.ttfrm.txtDayAmt.readOnly = true;

			document.ttfrm.txtMntAmt.style.backgroundColor = "#dcdcdc";
			document.ttfrm.txtMntAmt.value = ""
			document.ttfrm.txtMntAmt.readOnly = true;	
		}

		if (name=="month")
		{
			document.ttfrm.txtMntAmt.style.backgroundColor="#ffffff";
			document.ttfrm.txtMntAmt.readOnly = false;

			document.ttfrm.txtWeekAmt.style.backgroundColor = "#dcdcdc";
			document.ttfrm.txtWeekAmt.value = ""
			document.ttfrm.txtWeekAmt.readOnly = true;
			
			document.ttfrm.txtDayAmt.style.backgroundColor="#dcdcdc";
			document.ttfrm.txtDayAmt.value = ""
			document.ttfrm.txtDayAmt.readOnly = true;
		}
		
	}
	
}
//**********************************

function CustManageShowHide(name)
{
	//alert(name);

	if (document.ttfrm.rbModel[0].checked) {
		document.ttfrm.btnCalculate.disabled = true;
	
		//document.ttfrm.txtDay.className="cDatTxt";		
		
		document.ttfrm.txtDayAmt.style.backgroundColor="#ffffff";
		document.ttfrm.txtDayAmt.readOnly = false;
		document.ttfrm.txtWeekAmt.style.backgroundColor="#ffffff";
		document.ttfrm.txtWeekAmt.readOnly = false;
		document.ttfrm.txtMntAmt.style.backgroundColor="#ffffff";
		document.ttfrm.txtMntAmt.readOnly = false;
	}

	if (document.ttfrm.rbModel[1].checked && name=='click') {
		document.ttfrm.btnCalculate.disabled = false;
	}


	if (document.ttfrm.rbModel[1].checked && name!='click' ) {

		document.ttfrm.HiddenSelection.value = name;
		
		if (name=="day")
		{
			document.ttfrm.txtDayAmt.style.backgroundColor="#ffffff";
			document.ttfrm.txtDayAmt.readOnly = false;
			
			document.ttfrm.txtWeekAmt.style.backgroundColor = "#dcdcdc";
			document.ttfrm.txtWeekAmt.value = ""
			document.ttfrm.txtWeekAmt.readOnly = true;

			document.ttfrm.txtMntAmt.style.backgroundColor = "#dcdcdc";
			document.ttfrm.txtMntAmt.value = ""
			document.ttfrm.txtMntAmt.readOnly = true;	
		}
		
		if (name=="week")
		{
			document.ttfrm.txtWeekAmt.style.backgroundColor="#ffffff";
			document.ttfrm.txtWeekAmt.readOnly = false;
			
			document.ttfrm.txtDayAmt.style.backgroundColor="#dcdcdc";
			document.ttfrm.txtDayAmt.value = ""
			document.ttfrm.txtDayAmt.readOnly = true;

			document.ttfrm.txtMntAmt.style.backgroundColor = "#dcdcdc";
			document.ttfrm.txtMntAmt.value = ""
			document.ttfrm.txtMntAmt.readOnly = true;	
		}

		if (name=="month")
		{
			document.ttfrm.txtMntAmt.style.backgroundColor="#ffffff";
			document.ttfrm.txtMntAmt.readOnly = false;

			document.ttfrm.txtDayAmt.style.backgroundColor="#dcdcdc";
			document.ttfrm.txtDayAmt.value = ""
			document.ttfrm.txtDayAmt.readOnly = true;
			
			document.ttfrm.txtWeekAmt.style.backgroundColor = "#dcdcdc";
			document.ttfrm.txtWeekAmt.value = ""
			document.ttfrm.txtWeekAmt.readOnly = true;
		}
		
	}
	
}
//**********************************

function CustManageCalculateModel()
{
	name = document.ttfrm.HiddenSelection.value;
	var resultMonth=0;
	var resultWeek=0;
	var strResultMonth = "";
	var strResultWeek="";
	
	//form = document.ttfrm;
	//alert(name);

	if (name=="day")
	{		
		if (document.ttfrm.txtDayAmt.value == ""){
            DayAmt = document.ttfrm.hDayAmtTmp.value;
            document.ttfrm.txtDayAmt.value = document.ttfrm.hDayAmtTmp.value;
        }
        else
        {
            DayAmt = document.ttfrm.txtDayAmt.value;
        }
            
        //DayAmt = DayAmt.replace(",",".");
        if (DayAmt.indexOf(",")>0 || DayAmt.indexOf(".")>0)
		{
			alert("Lütfen miktarı nokta ya da virgül kullanmadan, tamsayı olarak giriniz!");
			return false;
		}
				
		resultWeek = (DayAmt * 7)
        strResultWeek = resultWeek.toFixed(0);  
        document.ttfrm.txtWeekAmt.value = strResultWeek;//.replace(".",","); //(DayAmt * 7);
         
        resultMonth = (DayAmt * 30)
        strResultMonth = resultMonth.toFixed(0);       
        document.ttfrm.txtMntAmt.value = strResultMonth;//.replace(".",","); //(DayAmt * 30);        
	}
	
	if (name=="week")
	{		
        if (document.ttfrm.txtWeekAmt.value == "") {
            WeekAmt = document.ttfrm.hWeekAmtTmp.value;
            document.ttfrm.txtWeekAmt.value = document.ttfrm.hWeekAmtTmp.value;
        }
        else
        {
            WeekAmt = document.ttfrm.txtWeekAmt.value;		
		}
		
		//WeekAmt = WeekAmt.replace(",",".");
		if (WeekAmt.indexOf(",")>0 || WeekAmt.indexOf(".")>0)
		{
			alert("Lütfen miktarı nokta ya da virgül kullanmadan, tamsayı olarak giriniz!");
			return false;
		}
                       
		if (document.ttfrm.txtDayAmt.value == "") 
        {
			document.ttfrm.txtDayAmt.value = WeekAmt;
		}
                         
        resultMonth = (WeekAmt * 4)
        strResultMonth = resultMonth.toFixed(0);       
        document.ttfrm.txtMntAmt.value = strResultMonth;//.replace(".",","); // (WeekAmt * 4);
        
	}
			
	if (name=="month")
	{
		if (document.ttfrm.txtMntAmt.value == "") {
			MonthAmt = document.ttfrm.hMonthAmtTmp.value;
            document.ttfrm.txtMntAmt.value = document.ttfrm.hMonthAmtTmp.value;
        }
        else
            MonthAmt = document.ttfrm.txtMntAmt.value;
	
		if (document.ttfrm.txtDayAmt.value == "") 
        {
			document.ttfrm.txtDayAmt.value = MonthAmt;        
		}
            
         if (document.ttfrm.txtWeekAmt.value == "") 
         {
			document.ttfrm.txtWeekAmt.value = MonthAmt;    
		}            
	}
	
}
//**********************************

function CalculateModel()
{
	name = document.ttfrm.HiddenSelection.value;
	var result=0;
	var strresult = "";
	
	//form = document.ttfrm;
	//alert(name);

	if (name=="day")
	{		
		if (document.ttfrm.txtDayAmt.value == ""){
            DayAmt = document.ttfrm.hDayAmtTmp.value;
            document.ttfrm.txtDayAmt.value = document.ttfrm.hDayAmtTmp.value;
        }
        else
        {
            DayAmt = document.ttfrm.txtDayAmt.value;
        }
            
        //DayAmt = DayAmt.replace(",",".");
        if (DayAmt.indexOf(",")>0 || DayAmt.indexOf(".")>0)
		{
			alert("Lütfen miktarı nokta ya da virgül kullanmadan, tamsayı olarak giriniz!");
			return false;
		}
		
		result = (DayAmt * 7)
        strresult = result.toFixed(0);
              
        document.ttfrm.txtWeekAmt.value = strresult;//.replace(".",","); //(DayAmt * 7);
        
        
        result = (DayAmt * 30)
        strresult = result.toFixed(0);
              
        document.ttfrm.txtMntAmt.value = strresult;//.replace(".",","); //(DayAmt * 30);
	}
	
	if (name=="week")
	{		
        if (document.ttfrm.txtWeekAmt.value == "") {
            WeekAmt = document.ttfrm.hWeekAmtTmp.value;
            document.ttfrm.txtWeekAmt.value = document.ttfrm.hWeekAmtTmp.value;
        }
        else
        {
            WeekAmt = document.ttfrm.txtWeekAmt.value;		
		}
		
		//WeekAmt = WeekAmt.replace(",",".");
		if (WeekAmt.indexOf(",")>0 || WeekAmt.indexOf(".")>0)
		{
			alert("Lütfen miktarı nokta ya da virgül kullanmadan, tamsayı olarak giriniz!");
			return false;
		}
                       
		if (document.ttfrm.txtDayAmt.value == "") 
        {
			document.ttfrm.txtDayAmt.value = WeekAmt;
		}
                         
        resultMonth = (WeekAmt * 4)
        strResultMonth = resultMonth.toFixed(0);       
        
        document.ttfrm.txtMntAmt.value = strResultMonth;//.replace(".",","); // (WeekAmt * 4);
        
	}
			
	if (name=="month")
	{
		if (document.ttfrm.txtMntAmt.value == "") {
			MonthAmt = document.ttfrm.hMonthAmtTmp.value;
            document.ttfrm.txtMntAmt.value = document.ttfrm.hMonthAmtTmp.value;
        }
        else
            MonthAmt = document.ttfrm.txtMntAmt.value;
	
		if (document.ttfrm.txtDayAmt.value == "")
            document.ttfrm.txtDayAmt.value = MonthAmt;
            
        if (document.ttfrm.txtWeekAmt.value == "")
            document.ttfrm.txtWeekAmt.value = MonthAmt;
	}
	
}
//**********************************
function ClearModel()
{
	document.ttfrm.txtDayAmt.value = "";
	document.ttfrm.txtWeekAmt.value = "";
	document.ttfrm.txtMntAmt.value = "";
}

//**********************************
function CustManageClearModel()
{
	document.ttfrm.txtDayAmt.value = "";
	document.ttfrm.txtWeekAmt.value = "";
	document.ttfrm.txtMntAmt.value = "";
}


//**********************************

function CustShowHide(name)
{	
	if (document.ttfrm.rbModel[0].checked) {
		document.ttfrm.btnCalculate.disabled = true;
		
		document.ttfrm.txtDayAmt.style.backgroundColor="#ffffff";
		document.ttfrm.txtDayAmt.readOnly = false;
		document.ttfrm.txtMonthAmt.style.backgroundColor="#ffffff";
		document.ttfrm.txtMonthAmt.readOnly = false;
	}
	
	if (document.ttfrm.rbModel[1].checked && name=='click') {
		document.ttfrm.btnCalculate.disabled = false;
	}
	
	if (document.ttfrm.rbModel[1].checked && name!='click') {
	
		document.ttfrm.HiddenSelection.value = name;
		if (name=="day")
		{						
			document.ttfrm.txtDayAmt.style.backgroundColor="#ffffff";
			document.ttfrm.txtDayAmt.readOnly = false;
			
			document.ttfrm.txtMonthAmt.style.backgroundColor = "#dcdcdc";
			document.ttfrm.txtMonthAmt.value = ""
			document.ttfrm.txtMonthAmt.readOnly = true;	
		}
					
		if (name=="month")
		{
			document.ttfrm.txtMonthAmt.style.backgroundColor="#ffffff";
			document.ttfrm.txtMonthAmt.readOnly = false;
			
			document.ttfrm.txtDayAmt.style.backgroundColor="#dcdcdc";
			document.ttfrm.txtDayAmt.value = ""
			document.ttfrm.txtDayAmt.readOnly = true;
		}
	}
}
//**********************************

function CalculateCustModel()
{
	name = document.ttfrm.HiddenSelection.value;
	var result=0;
	var strresult = "";
	
	if (name=="day")
	{		
		if (document.ttfrm.txtDayAmt.value == ""){
            DayAmt = document.ttfrm.hDayAmtTmp.value;
            document.ttfrm.txtDayAmt.value = document.ttfrm.hDayAmtTmp.value;
        }
        else
        {
            DayAmt = document.ttfrm.txtDayAmt.value;
        }
        
        DayAmt = DayAmt.replace(",",".");
        result = (DayAmt * 30)
        strresult = result.toFixed(2);
       
        document.ttfrm.txtMonthAmt.value = strresult;//.replace(".",","); //(DayAmt * 30);
	}
			
	if (name=="month")
	{
		if (document.ttfrm.txtMonthAmt.value == "") {
			MonthAmt = document.ttfrm.hMonthAmtTmp.value;
            document.ttfrm.txtMonthAmt.value = document.ttfrm.hMonthAmtTmp.value;
        }
        else
            MonthAmt = document.ttfrm.txtMonthAmt.value;
	
		if (document.ttfrm.txtDayAmt.value == "") 
            document.ttfrm.txtDayAmt.value = MonthAmt;        
	}
	
}
//**********************************
function CalculateBoxes(value)
{
	name = value;
	var result=0;
	var strresult = "";

	if (name=="month")
	{   
		document.ttfrm.txtWeekAmt.value = "";     
        document.ttfrm.txtMntAmt.value = "";
	}
				
	if (name=="day")
	{
		if (document.ttfrm.txtDayAmt.value != "") 
		{
			DayAmt = document.ttfrm.txtDayAmt.value;
			if (DayAmt != "0" && DayAmt != "")
			{		
				//DayAmt = DayAmt.replace(",",".");
				if (DayAmt.indexOf(",")>0 || DayAmt.indexOf(".")>0)
				{
					alert("Lütfen miktarı nokta ya da virgül kullanmadan, tamsayı olarak giriniz!");
					return false;
				}
				
				result = (DayAmt * 7)
				strresult = result.toFixed(0);
				document.ttfrm.txtWeekAmt.value = strresult;//.replace(".",","); //(DayAmt * 7);
				
				result = (DayAmt * 30)
				strresult = result.toFixed(0);
				document.ttfrm.txtMntAmt.value = strresult;//.replace(".",","); //(DayAmt * 30);
			}
		}
	}	
}
//**********************************
function CalculateProvisionAmount(value1, value2)
{				
	value1 = value1.replace(",",".");
	value2 = value2.replace(",",".");
	document.provFrm.txtAmount.value = (value1 * value2).toFixed(2).replace(".",",");
	document.provFrm.hdnAmount.value=(value1 * value2).toFixed(2).replace(".",",");
}

//************************************
function CalculateEditBoxes(ClientId)
{
	//ClientId="txtMonthAmt";
	var obj = document.getElementById(ClientId);

	//if (name=="month")
	if (ClientId.indexOf("DayAmt") > 0)
	{ 
		var otherTextId = ClientId.replace("DayAmt","MonthAmt");
		var objOther = document.getElementById(otherTextId);
        objOther.value = "";
	}
	
					
	//if (name=="day")
	if (ClientId.indexOf("MonthAmt") > 0)
	{
		var otherTextId = ClientId.replace("MonthAmt","DayAmt");
		var objOther = document.getElementById(otherTextId);
		var OtherValue = objOther.value;		
		
		var result=0;
		var strresult = "";
		
		if (OtherValue != "")
		{					
			if (OtherValue.indexOf(",")>0 || OtherValue.indexOf(".")>0)
			{
				alert("Lütfen miktarı nokta ya da virgül kullanmadan, tamsayı olarak giriniz!");
				return false;
			}
			
			//OtherValue = OtherValue.replace(",",".");
			result = (OtherValue * 30)
			strresult = result.toFixed(0);

			//OtherValue = (OtherValue * 30);
			obj.value = strresult;//.replace(".",","); //OtherValue;
		}

	}
}

//************************************
function ClearCustModel()
{
	document.ttfrm.txtDayAmt.value = "";
	document.ttfrm.txtMonthAmt.value = "";
}
//************************************
function checkAll(field)
{
	if (field.length > 1) {
		for (i = 0; i < field.length; i++)
			field[i].checked = true ;		
	}
	else
	{
		field.checked = true ;
	}
}

function uncheckAll(field)
{
	if (field.length > 1) {
		for (i = 0; i < field.length; i++)
			field[i].checked = false ;
	}
	else
	{
		field.checked = false ;
	}
}

function uncheckSelections(field)
{
	if (field.length > 1) {
		for (i = 0; i < field.length; i++)
			field[i].checked = false ;
	}
	else
	{
		field.checked = false ;
	}
	
	document.all("chkShowList").checked = false;
}
//************************************

function EnableContinue()
{
	if (document.menuFrm.chkConfirm.checked==true)
	{
		//document.menuFrm.btnContinue.disabled = false;
		document.all("btnContinue").disabled = false;
	}
	else
	{
		document.menuFrm.btnContinue.disabled = true;
	}
}
//************************************
function CheckMailBox()
	{			
		if (document.addCardFrm.chkOtherMail.checked)
		{
			document.addCardFrm.txtOtherMail.style.backgroundColor = "#ffffff";
			document.addCardFrm.txtOtherMail.readOnly = false;
		}
		else
		{
			document.addCardFrm.txtOtherMail.style.backgroundColor = "#dcdcdc";
			document.addCardFrm.txtOtherMail.readOnly = true;
		}
	}				
//************************************
function EnableLimitBoxes()
{
	document.ttfrm.txtDayAmt.readOnly = false;
	document.ttfrm.txtDayAmt.style.backgroundColor = "#ffffff";
	
	document.ttfrm.txtWeekAmt.readOnly = false;
	document.ttfrm.txtWeekAmt.style.backgroundColor = "#ffffff";
	
	document.ttfrm.txtMntAmt.readOnly = false;
	document.ttfrm.txtMntAmt.style.backgroundColor = "#ffffff";
	
	document.ttfrm.hdnAmount.value="1";
}
//************************************
function EnableDayBoxes()
{
	//document.ttfrm.chkMo2.disabled = false;
	document.ttfrm.chkMo.disabled = false;
	document.ttfrm.chkTu.disabled = false;
	document.ttfrm.chkWe.disabled = false;
	document.ttfrm.chkTh.disabled = false;
	document.ttfrm.chkFr.disabled = false;
	document.ttfrm.chkSa.disabled = false;
	document.ttfrm.chkSu.disabled = false;
	document.ttfrm.hdnDays.value="1";
}
//************************************
function DisableDayBoxes()
{
	//document.ttfrm.chkMo2.disabled = true;
	document.ttfrm.chkMo.disabled = true;
	document.ttfrm.chkTu.disabled = true;
	document.ttfrm.chkWe.disabled = true;
	document.ttfrm.chkTh.disabled = true;
	document.ttfrm.chkFr.disabled = true;
	document.ttfrm.chkSa.disabled = true;
	document.ttfrm.chkSu.disabled = true;
	document.ttfrm.hdnDays.value="0";
}
//************************************
function FleetCheckBoxes()
{
	var totalG1 = 0;
	var totalG2 = 0;
	var ProdG1 = addCardFrm.cblProdG1.length;
	var ProdG2 = addCardFrm.cblProdG2.length;
	
	for (var idx = 0; idx < ProdG1; idx++) {
		if (eval("document.addCardFrm.cblProdG1[" + idx + "].checked") == true) {
			totalG1 += 1;
		}
	}

	for (var idx = 0; idx < ProdG2; idx++) {
		if (eval("document.addCardFrm.cblProdG2[" + idx + "].checked") == true) {
			totalG2 += 1;
		}
	}


	if (totalG1>0 && totalG2>0){

		for (var idx = 0; idx < ProdG1; idx++) {
			box = eval("document.addCardFrm.cblProdG1[" + idx + "]")
			box.checked = false;
		}
	
		for (var idx = 0; idx < ProdG2; idx++) {
			box = eval("document.addCardFrm.cblProdG2[" + idx + "]")
			box.checked = false;
		}
 
		alert("Farklı kategorilerde ürün seçemezsiniz.");
	}

}
//************************************

function isValidString(checkStr, checkOK) {
  decPoints = 0;
  allNum = "";

  for (i = 0;  i < checkStr.length;  i++){
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length){
      return false;
    }
    allNum += ch;
  }
return true;
}
//*************************************
function up(lstr)
{
	var str=lstr.value;
	lstr.value=str.toUpperCase();
}
//*************************************
function CheckRadioButtons(idx)
		{
			var cbx = eval("document.getElementById('cb" + idx + "')");
			var box = eval('document.all["rdo' + idx + '"]'); // document.all["rdo21"]; //eval("frm.rdo" + idx + "[0]");
			
			//if (document.all("cb21").checked == true)
			if (cbx.checked == true)
			//if (document.getElementById("cb21").checked == true)
			{
				
				//document.getElementById(obj).readOnly= false;
				//document.getElementById("rdo21").disabled=false;
				//box1.disabled=false;box1.checked=true;
				box[0].disabled=false;box[0].checked=true;
				box[1].disabled=false;box[1].checked=false;
			}
			else
			{
				box[0].disabled=true;box[0].checked=false;
				box[1].disabled=true;box[1].checked=false;
			}

		}