var http;
function toggle_username(userid)
{
	http=GetXmlHttpObject();
    handle = document.getElementById(userid);
    
     if (http==null)
	 {
		 alert ("Browser does not support HTTP Request");
		 return;
	 }
var url="app/ajax.php?username="+handle.value;
http.onreadystatechange=statechange_username;
http.open("GET",url,true);
http.send(null);

}

function toggle_editusername(useridd)
{
	http=GetXmlHttpObject();
    handle1 = document.getElementById(useridd);
    
     if (http==null)
	 {
		 alert ("Browser does not support HTTP Request");
		 return;
	 }
var url="app/ajaxpanel.php?username="+handle1.value;
http.onreadystatechange=statechange_username;
http.open("GET",url,true);
http.send(null);

}

function funChangeImg()
{
	http=GetXmlHttpObject();
    
     if (http==null)
	 {
		 alert ("Browser does not support HTTP Request");
		 return;
	 }
var url="app/returnCaptcha.php";
http.onreadystatechange=statechange_captcha;
http.open("GET",url,true);
http.send(null);

}

function fungetService(servcat)
{
	http=GetXmlHttpObject();
	var servicecatagory = document.getElementById(servcat);
	document.getElementById('hdnmajser').value = servicecatagory.value;
    //alert(servicecatagory.value);
     if (http==null)
	 {
		 alert ("Browser does not support HTTP Request");
		 return;
	 }
	var url="app/ipc.php?servcat="+servicecatagory.value+"&st=1";
	http.onreadystatechange=statechange_getservice;
	http.open("GET",url,true);
	http.send(null);
}

function fungetWordrange(servicetype)
{
	http=GetXmlHttpObject();
	var serviceType = document.getElementById(servicetype);
	var seltat=document.getElementById('seltat');
	seltat.options.length = '1';
	document.getElementById('txtWcount').value = '';
	document.getElementById('ipctotpricetd').innerHTML = '$ __.__';
	if(serviceType.value <= 6 || serviceType.value>= 13)
	{
		document.getElementById('wctexttd').innerHTML = '<input type="text" id="txtWcount" name="txtWcount"  style="width:197px;" maxlength="10" onKeyPress="return funCheck(event);" onkeyup="javascript:fungettotPrice(\'selServ\',\'seltat\',\'txtWcount\');funcheckWordrange(\'selServ\',\'selWordRange\',\'seltat\',\'txtWcount\');"  />';
	    //alert(serviceType.value);
	     if (http==null)
		 {
			 alert ("Browser does not support HTTP Request");
			 return;
		 }
		var url="app/ipc.php?servicetype="+serviceType.value+"&st=2";
		http.onreadystatechange=statechange_getwordrange;
		http.open("GET",url,true);
		http.send(null);
	}
	else
	{
		document.getElementById('wctexttd').innerHTML = '<input type="text" id="txtWcount" name="txtWcount"  style="width:197px;" maxlength="2" onKeyPress="return funCheck(event);" onkeyup="javascript:fungettotPrice(\'selServ\',\'seltat\',\'txtWcount\');funcheckWordrange(\'selServ\',\'selWordRange\',\'seltat\',\'txtWcount\');"  />';
		document.getElementById('ipcwordrangelbl').style.display = 'none';
		document.getElementById('selWordRange').style.display = 'none';
		if(serviceType.value == 7)
		{
		    seltat.options[seltat.options.length]=new Option('3 days',3);
			seltat.options[seltat.options.length]=new Option('5 days',5);
			seltat.options[seltat.options.length]=new Option('10 days',10);
		}
		else if(serviceType.value == 8)
		{
			seltat.options[seltat.options.length]=new Option('3 days',3);
			seltat.options[seltat.options.length]=new Option('5 days',5);
		}
		else if(serviceType.value == 9)
		{
			seltat.options[seltat.options.length]=new Option('2 days',2);
		}
		else if(serviceType.value == 10)
		{
		    seltat.options[seltat.options.length]=new Option('3 days',3);
		}
		else if(serviceType.value == 11)
		{
		    seltat.options[seltat.options.length]=new Option('10 days',10);
		}
	}
	
	if(serviceType.value >= 7 && serviceType.value < 12)
	{
	    document.getElementById('lblwctd').innerHTML = 'Number of Assignments:';
    }
    else
    {
	    document.getElementById('lblwctd').innerHTML = 'Word Count of your Manuscript:';
    }
}
function fungetTAT(servicetype,wordrange)
{
	http=GetXmlHttpObject();
	var serviceType = document.getElementById(servicetype);
	var wordrange = document.getElementById(wordrange);
    //alert(serviceType.value);
     if (http==null)
	 {
		 alert ("Browser does not support HTTP Request");
		 return;
	 }
	var url="app/ipc.php?servicetype="+serviceType.value+"&wordrange="+wordrange.value+"&st=3";
	http.onreadystatechange=statechange_gettat;
	http.open("GET",url,true);
	http.send(null);
}

function fungettotPrice(servicetype,tat,wordcount)
{
	http=GetXmlHttpObject();
	var serviceType = document.getElementById(servicetype);
	var turntime = document.getElementById(tat);
	var wCount = document.getElementById(wordcount);
    //alert(serviceType.value);
     if (http==null)
	 {
		 alert ("Browser does not support HTTP Request");
		 return;
	 }
	var url="app/ipc.php?servicetype="+serviceType.value+"&turntime="+turntime.value+"&wCount="+wCount.value+"&st=4";
	http.onreadystatechange=statechange_gettotprice;
	http.open("GET",url,true);
	http.send(null);
}

function funcheckWordrange(serv_id,word_range,T_time,word_count)
{
	var sType = document.getElementById(serv_id).value;
	var wRange = document.getElementById(word_range).value;
	var tTime = document.getElementById(T_time).value;
	var wCount = document.getElementById(word_count).value;
	if(sType == 1 && wRange == 1 && wCount > 9999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 1 && wRange == 2 && wCount > 19999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 1 && wRange == 3 && wCount > 39999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 1 && wRange == 4 && wCount > 99999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 2 && wRange == 1 && wCount > 5449)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 2 && wRange == 2 && wCount > 9999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 2 && wRange == 3 && wCount > 19999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 2 && wRange == 4 && wCount > 39999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 2 && wRange == 5 && wCount > 99999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 3 && wRange == 1 && wCount > 19999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 3 && wRange == 2 && wCount > 39999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 3 && wRange == 3 && wCount > 99999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 4 && wRange == 1 && wCount > 9999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 4 && wRange == 2 && wCount > 19999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 4 && wRange == 3 && wCount > 39999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 4 && wRange == 4 && wCount > 99999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 5 && wRange == 1 && wCount > 9999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 6 && wRange == 1 && wCount > 9999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 6 && wRange == 2 && wCount > 19999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 6 && wRange == 3 && wCount > 39999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 6 && wRange == 4 && wCount > 99999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 13 && wRange == 1 && wCount > 2749)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 14 && wRange == 1 && wCount > 2749)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 15 && wRange == 1 && wCount > 2749)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 15 && wRange == 2 && wCount > 5449)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 15 && wRange == 3 && wCount > 7500)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 16 && wRange == 1 && wCount > 2749)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 17 && wRange == 1 && wCount > 2749)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 18 && wRange == 1 && wCount > 9999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 18 && wRange == 2 && wCount > 19999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 18 && wRange == 3 && wCount > 39999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	else if(sType == 18 && wRange == 4 && wCount > 99999)
	{
		alert('Word count exceeds according to your selected word range!');
		document.getElementById(word_count).value = '';
		fungettotPrice(serv_id,T_time,word_count);
	}
	
}

function statechange_username() {
    if (http.readyState == 4 || http.readyState == 'complete') 
    {
        var msg = http.responseText;
        if(msg == 0)
        {
	      //document.getElementById('username_exists').innerHTML = "user name is available";
	      document.getElementById('imguser').style.display = 'block';
	      document.getElementById('imguser').src = "images/userexist.gif";
	      //document.getElementById('hdnMsg').value = '0';
	      if(document.getElementById('lblErr').style.display == 'block')
	      {
		      document.getElementById('imgErr').style.display = 'none';
		      document.getElementById('lblErr').style.display = 'none';
	      }
	      
        }
        else if(msg == 1)
        {
	        //document.getElementById('username_exists').innerHTML = "sorry, the username is not available";
	        document.getElementById('imguser').style.display = 'block';
	        document.getElementById('imguser').src = "images/usernotexist.gif"; 
	        //document.getElementById('hdnMsg').value = '1';
	        if(document.getElementById('lblErr').style.display == 'block')
	      	{
		      document.getElementById('imgErr').style.display = 'none';
		      document.getElementById('lblErr').style.display = 'none';
	      	}
        }
        else
        {
	        //document.getElementById('username_exists').innerHTML = "";
	        document.getElementById('imguser').style.display = 'none';
	        //document.getElementById('hdnMsg').value = '0';
        }
        
        //alert(msg);
        //document.getElementById('username_exists').innerHTML = html;
    }
}

function statechange_captcha() {
    if (http.readyState == 4 || http.readyState == 'complete') 
    {
        var msg1 = http.responseText;
        document.getElementById('tdCaptcha').innerHTML = msg1;
        document.getElementById('security_code').value = '';
    }
    else
    {
	    document.getElementById('tdCaptcha').innerHTML = "<img src='images/arrows16.gif' style='margin:auto;' />";
    }
}
function statechange_getservice()
{
	if (http.readyState == 4 || http.readyState == 'complete') 
    {
	    var services = http.responseText;
	    document.getElementById('ipcservicetd').innerHTML = services;
	    var selWr=document.getElementById('selWordRange');
	    var seltat=document.getElementById('seltat');
	    selWr.options.length = '1';
	    seltat.options.length = '1';
	    document.getElementById('txtWcount').value = '';
	    document.getElementById('ipctotpricetd').innerHTML = '$ __.__';
	    majservtype = document.getElementById('hdnmajser').value;
	    if(majservtype == 'Publication Support')
	    {
	    	document.getElementById('lblwctd').innerHTML = 'Number of Assignments:';
    	}
    	else
    	{
	    	document.getElementById('lblwctd').innerHTML = 'Word Count of your Manuscript:';
    	}
    }
}
function statechange_getwordrange()
{
	if (http.readyState == 4 || http.readyState == 'complete') 
    {
	    var wordrange = http.responseText;
	    if(wordrange != '')
	    {
		    document.getElementById('ipcwordrangelbl').style.display = 'block';
		    document.getElementById('selWordRange').style.display = 'block';
		    document.getElementById('ipcwordrangetd').innerHTML = wordrange;
    	}
    }
}
function statechange_gettat()
{
	if (http.readyState == 4 || http.readyState == 'complete') 
    {
	    var tat = http.responseText;
	    document.getElementById('ipctattd').innerHTML = tat;
    }
}
function statechange_gettotprice()
{
	if (http.readyState == 4 || http.readyState == 'complete') 
    {
	    var totprice = http.responseText;
	    document.getElementById('ipctotpricetd').innerHTML = totprice;
    }
}
function GetXmlHttpObject()
{
var http=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 http=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  http=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  http=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return http;
}
/*----------------------------Validatin for referral--------------------*/
function showReferral(val)
{
	if(val != 'Select')
	{
		document.getElementById('lblCode').style.display = 'block';
		document.getElementById('txtReferral').style.display = 'block';
		document.getElementById('tblDisc').style.display = 'block';
	}
	else
	{
		document.getElementById('lblCode').style.display = 'none';
		document.getElementById('txtReferral').style.display = 'none';
		document.getElementById('tblDisc').style.display = 'none';
		document.getElementById('txtReferral').value = '';
	}
}
/*-----------------------Validation Check for Date--------------------------------*/ 
function validateForm(oForm)
{
 	//oForm refers to the form which you want to validate
 	oForm.onsubmit = function() // attach the function to onsubmit event
 	{
		if(oForm.elements['hdnMsg'].value != '')
 		{
	 		txtwords = oForm.elements['txtwords'];
	 		selService = oForm.elements['selService'];
	 		date = oForm.elements['date'];
	 		journalformat = oForm.elements['hdnJournalformat'].value;
	 		var ret = funCheckTAT('txtwords','selService','date',journalformat);
	 		if(ret == 'false')
	 		{
		 		document.getElementById('date').select();
		 		document.getElementById('date').focus();
	 		}
			return ret;
 		}
 		return true;
 	}
 	
 }
 /*-----------------------End of Validation Check for Date--------------------------------*/
  
/*-----------------------Isnumeric--------------------------------*/ 
 function IsNumeric(field,strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (var i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
	     	alert('Enter numeric only!!!');
	     	field.value = '';
        	blnResult = false;
         }
      }
   return blnResult;
   }
   
function funCheck(e)
{

	if(navigator.appName == 'Microsoft Internet Explorer')
	{
		if(e.keyCode>=48 && e.keyCode<=57)
		{
			return true;
		}
		else if(e.keyCode == 8)
		{
			return true;
		}
		else if(e.keyCode == 127 || e.charCode == 127 || e.which == 127)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	else
	{
		if(e.which>=48 && e.which<=57)
		{
			return true;
		}
		else if(e.which == 8)
		{
			return true;
		}
		else if(e.which == 127 || e.charCode == 127 || e.keyCode == 127)
		{
			return true;
		}
		else
		{
			return false;
		}
	}

}
/*-----------------------Isnumeric End--------------------------------*/    
function displayServ(val)
{
   if(val == 1 || val == 14 )
   {
	   document.getElementById('lblservdetail').style.display = 'block';
	   document.getElementById('txtServiceDetail').style.display = 'block';
	   document.getElementById('tblServDetail').style.display = 'block';
   }
   else
   {
	   document.getElementById('lblservdetail').style.display = 'none';
	   document.getElementById('txtServiceDetail').style.display = 'none';
	   document.getElementById('tblServDetail').style.display = 'none';
	   document.getElementById('txtServiceDetail').value = '';
   }
}

function displayOther(val)
{
   if(val == 'Others')
   {
	   document.getElementById('lblOtypes').style.display = 'block';
	   document.getElementById('tblOthers').style.display = 'block';
   }
   else
   {
	   document.getElementById('lblOtypes').style.display = 'none';
	   document.getElementById('tblOthers').style.display = 'none';
	   document.getElementById('txtOtypes').value = '';
   }
}


function funloginbox()
{
	if(document.getElementById('loginbox').style.display == 'none')
	{
		document.getElementById('signinach').style.color = '#ab093e';
		document.getElementById('signindiv').style.background = 'url(images/loginhover.png)';
		document.getElementById('loginbox').style.display = 'block';
	}
	else
	{
		document.getElementById('signinach').style.color = '#ffffff';
		document.getElementById('signindiv').style.background = '';
		document.getElementById('loginbox').style.display = 'none';
	}
}

function funTestscroll(notest,val)
{
	testno = document.getElementById(notest).value;
	testval = document.getElementById(val).value;
	for(var i=0;i<=testno-1;i++)
	{
		if(i == testval)
		{
			document.getElementById('test'+i).style.display = 'block';
		}
		else
		{
			document.getElementById('test'+i).style.display = 'none';
		}
	}
}
function funTestnext(tottest,tno)
{
	ttest = Number(document.getElementById(tottest).value);
	tval = Number(document.getElementById(tno).value);
	if(tval == ttest-1)
	{
		nval = 0;
		document.getElementById(tno).value = nval;
	}
	else
	{
		nval = Number(tval + 1);
		document.getElementById(tno).value = nval;
	}
	
	for(var i=0;i<=ttest-1;i++)
	{
		if(i == nval)
		{
			document.getElementById('test'+i).style.display = 'block';
		}
		else
		{
			document.getElementById('test'+i).style.display = 'none';
		}
	}
}

function funTestprev(tottest,tno)
{
	ttest = Number(document.getElementById(tottest).value);
	tval = Number(document.getElementById(tno).value);
	if(tval == 0)
	{
		nval = Number(ttest-1);
		document.getElementById(tno).value = nval;
	}
	else
	{
		nval = Number(tval - 1);
		document.getElementById(tno).value = nval;
	}
	
	for(var i=0;i<=ttest-1;i++)
	{
		if(i == nval)
		{
			document.getElementById('test'+i).style.display = 'block';
		}
		else
		{
			document.getElementById('test'+i).style.display = 'none';
		}
	}
}
/*-------------------------- Tab for Sampleedit ----------------------------*/

function FunBot(val)
			{
				document.getElementById('TABBOT1').style.display='none';
				document.getElementById('TABBOT2').style.display='none';
				document.getElementById('TABBOT3').style.display='none';
				
				document.getElementById('imgTab1').src='images/tab-buttons/before-editing.png';
				document.getElementById('imgTab2').src='images/tab-buttons/editing-progress.png';
				document.getElementById('imgTab3').src='images/tab-buttons/after-editing.png';
				
				if(val == 1)
				{
					 document.getElementById('TABBOT1').style.display='block';
					 document.getElementById('imgTab1').src='images/tab-buttons/before-editing-w.png';
				}
				else if(val == 2)
				{
					 document.getElementById('TABBOT2').style.display='block';
					 document.getElementById('imgTab2').src='images/tab-buttons/editing-progress-w.png';
				}
				else if(val == 3)
				{
					 document.getElementById('TABBOT3').style.display='block';
				   	 document.getElementById('imgTab3').src='images/tab-buttons/after-editing-w.png';
				}
			}
			
function FunTab(val)
			{
				document.getElementById('TABLOW1').style.display='none';
				document.getElementById('TABLOW2').style.display='none';
				document.getElementById('TABLOW3').style.display='none';
				
				document.getElementById('imgTabB1').src='images/tab-buttons/before-editing.png';
				document.getElementById('imgTabB2').src='images/tab-buttons/editing-progress.png';
				document.getElementById('imgTabB3').src='images/tab-buttons/after-editing.png';
				
				if(val == 1)
				{
					 document.getElementById('TABLOW1').style.display='block';
					 document.getElementById('imgTabB1').src='images/tab-buttons/before-editing-w.png';
				}
				else if(val == 2)
				{
					 document.getElementById('TABLOW2').style.display='block';
					 document.getElementById('imgTabB2').src='images/tab-buttons/editing-progress-w.png';
				}
				else if(val == 3)
				{
					 document.getElementById('TABLOW3').style.display='block';
				   	 document.getElementById('imgTabB3').src='images/tab-buttons/after-editing-w.png';
				}
			}
			
function FunBotPrice(val)
			{
				document.getElementById('TABBOT1').style.display='none';
				document.getElementById('TABBOT2').style.display='none';
				document.getElementById('TABBOT3').style.display='none';
				document.getElementById('TABBOT4').style.display='none';
				document.getElementById('TABBOT5').style.display='none';
				
				document.getElementById('imgTab1').src='images/tab-buttons/editing_price_deactive.png';
				document.getElementById('imgTab2').src='images/tab-buttons/writing_price_deactive.png';
				document.getElementById('imgTab3').src='images/tab-buttons/formatting_price_deactive.png';
				document.getElementById('imgTab4').src='images/tab-buttons/design_price_deactive.png';
				document.getElementById('imgTab5').src='images/tab-buttons/publication_price_deactive.png';
				
				document.getElementById('btnusd').src = 'images/curdollarbtn.png';
				document.getElementById('btneuro').src = 'images/cureurobtn.png';
				document.getElementById('btngbp').src = 'images/curgbpbtn.png';
				document.getElementById('btnjpy').src = 'images/curjpybtn.png';
				document.getElementById('btncny').src = 'images/curjpybtn.png';
				document.getElementById('btnkrw').src = 'images/curkrwbtn.png';
				document.getElementById('btntwd').src = 'images/curdollarbtn.png';
				document.getElementById('btnbrl').src = 'images/curbrlbtn.png';
				document.getElementById('btnsar').src = 'images/cursarbtn.png';
				document.getElementById('btnrub').src = 'images/currubbtn.png';
				
				if(val == 1)
				{
					 document.getElementById('TABBOT1').style.display='block';
					 document.getElementById('imgTab1').src='images/tab-buttons/editing_price_active.png';
					 document.getElementById('hdnservcat').value = 1;
				}
				else if(val == 2)
				{
					 document.getElementById('TABBOT2').style.display='block';
					 document.getElementById('imgTab2').src='images/tab-buttons/writing_price_active.png';
					 document.getElementById('hdnservcat').value = 2;
				}
				else if(val == 3)
				{
					 document.getElementById('TABBOT3').style.display='block';
					 document.getElementById('imgTab3').src='images/tab-buttons/formatting_price_active.png';
					 document.getElementById('hdnservcat').value = 3;
				}
				else if(val == 4)
				{
					 document.getElementById('TABBOT4').style.display='block';
				   	 document.getElementById('imgTab4').src='images/tab-buttons/design_price_active.png';
				   	 document.getElementById('hdnservcat').value = 4;
				}
				else if(val == 5)
				{
					 document.getElementById('TABBOT5').style.display='block';
				   	 document.getElementById('imgTab5').src='images/tab-buttons/publication_price_active.png';
				   	 document.getElementById('hdnservcat').value = 5;
				}
				document.getElementById('btnusd').src = 'images/curdollarbtnh.png';
				document.getElementById('tdcurtype').innerHTML = "US DOLLAR";
			}
/*----------------------------journal rec service----------------------*/
function funJournal(chkidd,hdnjf)
{
	var chkval = document.getElementById(chkidd).value;
	var jsval = document.getElementById(hdnjf).value;
	var jrsval = chkval + ",";  
	if(document.getElementById(chkidd).checked == true)
	{
	    jsval = jsval.replace(jrsval,'');
	}
	else if(document.getElementById(chkidd).checked == false)
	{
		jsval = jsval + jrsval;
	}
	document.getElementById(hdnjf).value = jsval;  
	//alert(jsval); 
}


/*Example message arrays for the two demo scrollers*/

var pausecontent=new Array()

pausecontent[0] = '<table cellpadding="1" cellspacing="1" style="width:350px;">';
pausecontent[0] += '<tr style="background:#ebebeb;"><td style="width:265px;">Progress in Materials Science</td><td>15.769</td></tr>';
pausecontent[0] += '<tr style="background:#fff7f6;"><td style="width:265px;">Microbiology and Molecular Biology Reviews</td><td>12.585</td></tr>';
pausecontent[0] += '<tr style="background:#ebebeb;"><td style="width:265px;">Thorax</td><td>7.041</td></tr>';
pausecontent[0] += '<tr style="background:#fff7f6;"><td style="width:265px;">Molecular Microbiology</td><td>5.361</td></tr>';
pausecontent[0] += '<tr style="background:#ebebeb;"><td style="width:265px;">Journal of Materials Chemistry</td><td>4.795</td></tr></table>';

pausecontent[1] = '<table cellpadding="1" cellspacing="1" style="width:350px;">';
pausecontent[1] += '<tr style="background:#fff7f6;"><td style="width:265px;">Macomolecules</td><td>4.539</td></tr>';
pausecontent[1] += '<tr style="background:#ebebeb;"><td style="width:265px;">Water Research</td><td>4.355</td></tr>';
pausecontent[1] += '<tr style="background:#fff7f6;"><td style="width:265px;">Rheumatology</td><td>4.236</td></tr>';
pausecontent[1] += '<tr style="background:#ebebeb;"><td style="width:265px;">International Journal of Hydrogen Energy</td><td>3.945</td></tr>';
pausecontent[1] += '<tr style="background:#fff7f6;"><td style="width:265px;">Langmuir</td><td>3.898</td></tr></table>';

pausecontent[2] = '<table cellpadding="1" cellspacing="1" style="width:350px;">';
pausecontent[2] += '<tr style="background:#ebebeb;"><td style="width:265px;">Journal of Tissue Engineering and Regenerative Medicine</td><td>3.857</td></tr>';
pausecontent[2] += '<tr style="background:#fff7f6;"><td style="width:265px;">Journal of Power Sources</td><td>3.792</td></tr>';
pausecontent[2] += '<tr style="background:#ebebeb;"><td style="width:265px;">Journal of Dermatological Science</td><td>3.713</td></tr>';
pausecontent[2] += '<tr style="background:#fff7f6;"><td style="width:265px;">American Journal of Cardiology</td><td>3.575</td></tr>';
pausecontent[2] += '<tr style="background:#ebebeb;"><td style="width:265px;">Microbial Cell Factories</td><td>3.432</td></tr></table>';

pausecontent[3] = '<table cellpadding="1" cellspacing="1" style="width:350px;">';
pausecontent[3] += '<tr style="background:#fff7f6;"><td style="width:265px;">Biotechnology and Bioengineering</td><td>3.377</td></tr>';
pausecontent[3] += '<tr style="background:#ebebeb;"><td style="width:265px;">Talanta</td><td>3.29</td></tr>';
pausecontent[3] += '<tr style="background:#fff7f6;"><td style="width:265px;">Toxicology</td><td>3.241</td></tr>';
pausecontent[3] += '<tr style="background:#ebebeb;"><td style="width:265px;">Fuel</td><td>3.179</td></tr>';
pausecontent[3] += '<tr style="background:#fff7f6;"><td style="width:265px;">European Journal of Pharmaceutics and Biopharmaceutics</td><td>3.151</td></tr></table>';

pausecontent[3] = '<table cellpadding="1" cellspacing="1" style="width:350px;">';
pausecontent[3] += '<tr style="background:#ebebeb;"><td style="width:265px;">Journal of Colloid & Interface Science</td><td>3.019</td></tr>';
pausecontent[3] += '<tr style="background:#fff7f6;"><td style="width:265px;">Separation and Purification Technology</td><td>2.879</td></tr>';
pausecontent[3] += '<tr style="background:#ebebeb;"><td style="width:265px;">Applied Clay Science</td><td>2.784</td></tr>';
pausecontent[3] += '<tr style="background:#fff7f6;"><td style="width:265px;">World Journal of Surgery</td><td>2.696</td></tr>';
pausecontent[3] += '<tr style="background:#ebebeb;"><td style="width:265px;">Survey of Ophthalmology</td><td>2.347</td></tr></table>';

pausecontent[4] = '<table cellpadding="1" cellspacing="1" style="width:350px;">';
pausecontent[4] += '<tr style="background:#fff7f6;"><td style="width:265px;">Basic & Clinical Pharmacology & Toxicology</td><td>2.308</td></tr>';
pausecontent[4] += '<tr style="background:#ebebeb;"><td style="width:265px;">Veterinary Parasitology</td><td>2.278</td></tr>';
pausecontent[4] += '<tr style="background:#fff7f6;"><td style="width:265px;">Solid State Ionics</td><td>2.162</td></tr>';
pausecontent[4] += '<tr style="background:#ebebeb;"><td style="width:265px;">Skin Pharmacology and physiology</td><td>2.117</td></tr>';
pausecontent[4] += '<tr style="background:#fff7f6;"><td style="width:265px;">Scandinavian Journal of Immunology</td><td>2.108</td></tr></table>';

pausecontent[5] = '<table cellpadding="1" cellspacing="1" style="width:350px;">';
pausecontent[5] += '<tr style="background:#ebebeb;"><td style="width:265px;">Journal of European Ceramic Society</td><td>2.09</td></tr>';
pausecontent[5] += '<tr style="background:#fff7f6;"><td style="width:265px;">Colloids and Surfaces A: Physicochemical and Engineering aspects</td><td>1.988</td></tr>';
pausecontent[5] += '<tr style="background:#ebebeb;"><td style="width:265px;">Journal of the American ceramic Society</td><td>1.944</td></tr>';
pausecontent[5] += '<tr style="background:#fff7f6;"><td style="width:265px;">Materials Letters</td><td>1.940</td></tr>';
pausecontent[5] += '<tr style="background:#ebebeb;"><td style="width:265px;">Acta Orthopaedica</td><td>1.909</td></tr></table>';

pausecontent[6] = '<table cellpadding="1" cellspacing="1" style="width:350px;">';
pausecontent[6] += '<tr style="background:#fff7f6;"><td style="width:265px;">Journal of Banking and Finance</td><td>1.908</td></tr>';
pausecontent[6] += '<tr style="background:#ebebeb;"><td style="width:265px;">BMC Gastroenterology</td><td>1.886</td></tr>';
pausecontent[6] += '<tr style="background:#fff7f6;"><td style="width:265px;">Materials Research Bulletin</td><td>1.879</td></tr>';
pausecontent[6] += '<tr style="background:#ebebeb;"><td style="width:265px;">Surface & Coatings Technology</td><td>1.793</td></tr>';
pausecontent[6] += '<tr style="background:#fff7f6;"><td style="width:265px;">Powder Technology</td><td>1.745</td></tr></table>';

pausecontent[7] = '<table cellpadding="1" cellspacing="1" style="width:350px;">';
pausecontent[7] += '<tr style="background:#ebebeb;"><td style="width:265px;">Thermochimica Acta</td><td>1.742</td></tr>';
pausecontent[7] += '<tr style="background:#fff7f6;"><td style="width:265px;">Ceramic International</td><td>1.686</td></tr>';
pausecontent[7] += '<tr style="background:#ebebeb;"><td style="width:265px;">Journal of Materials Science</td><td>1.667</td></tr>';
pausecontent[7] += '<tr style="background:#fff7f6;"><td style="width:265px;">Visual Neuroscience</td><td>1.273</td></tr>';
pausecontent[7] += '<tr style="background:#ebebeb;"><td style="width:265px;">International Journal of Mineral  Processing</td><td>1.196</td></tr></table>';

pausecontent[8] = '<table cellpadding="1" cellspacing="1" style="width:350px;">';
pausecontent[8] += '<tr style="background:#fff7f6;"><td style="width:265px;">Journal of Dispersion Science & Technology</td><td>0.686</td></tr>';
pausecontent[8] += '<tr style="background:#ebebeb;"><td style="width:265px;">Advanced Powder technology</td><td>0.636</td></tr></table>';


function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}

/* end demo scroller */


/*------------------price calculation---------------*/

function funChange(val)
{
	var curval = document.getElementById('hdncurvalue').value;
	if(curval == 1)
	{
		document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in US$</strong>";
		document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in US$</strong>";
		for(i=1;i<=26;i++)
		{
			document.getElementById('td'+i).innerHTML = document.getElementById('hdn'+i).value * val;
		}
	}
	else if(curval == 2)
	{
		document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in EURO</strong>";
		document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in EURO</strong>";
		for(i=1;i<=26;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdneuro').value * val)*100)/100;
		}
	}
	else if(curval == 3)
	{
		document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in GBP</strong>";
		document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in GBP</strong>";
		for(i=1;i<=26;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdngbp').value * val)*100)/100;
		}
	}
	else if(curval == 4)
	{
		document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in JPY</strong>";
		document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in JPY</strong>";
		for(i=1;i<=26;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnjpy').value * val)*100)/100;
		}
	}
	else if(curval == 5)
	{
		document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in CNY</strong>";
		document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in CNY</strong>";
		for(i=1;i<=26;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdncny').value * val)*100)/100;
		}
	}
	else if(curval == 6)
	{
		document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in KRW</strong>";
		document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in KRW</strong>";
		for(i=1;i<=26;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnkrw').value * val)*100)/100;
		}
	}
	else if(curval == 7)
	{
		document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in TWD</strong>";
		document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in TWD</strong>";
		for(i=1;i<=26;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdntwd').value * val)*100)/100;
		}
	}
	else if(curval == 8)
	{
		document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in BRL</strong>";
		document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in BRL</strong>";
		for(i=1;i<=26;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnbrl').value * val)*100)/100;
		}
	}
	else if(curval == 9)
	{
		document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in SAR</strong>";
		document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in SAR</strong>";
		for(i=1;i<=26;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnsar').value * val)*100)/100;
		}
	}
	else if(curval == 10)
	{
		document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in RUB</strong>";
		document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in RUB</strong>";
		for(i=1;i<=26;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnrub').value * val)*100)/100;
		}
	}
	
}

function funChangeMed(val)
{
	document.getElementById('tdmedprice').innerHTML = "<strong>Price for "+val+" page(s) in US$</strong>";
	for(i=29;i<=36;i++)
	{
		
		document.getElementById('td'+i).innerHTML = document.getElementById('hdn'+i).value * val;

	}
	
}
function funChangeFor(val)
{
	var curval = document.getElementById('hdncurvalue').value;
	if(curval == 1)
	{
		document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in US$</strong>";
		for(i=37;i<=50;i++)
		{
			document.getElementById('td'+i).innerHTML = document.getElementById('hdn'+i).value * val;
		}
	}
	else if(curval == 2)
	{
		document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in EURO</strong>";
		for(i=37;i<=50;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdneuro').value * val)*100)/100;
		}
	}
	else if(curval == 3)
	{
		document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in GBP</strong>";
		for(i=37;i<=50;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdngbp').value * val)*100)/100;
		}
	}
	else if(curval == 4)
	{
		document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in JPY</strong>";
		for(i=37;i<=50;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnjpy').value * val)*100)/100;
		}
	}
	else if(curval == 5)
	{
		document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in CNY</strong>";
		for(i=37;i<=50;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdncny').value * val)*100)/100;
		}
	}
	else if(curval == 6)
	{
		document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in KRW</strong>";
		for(i=37;i<=50;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnkrw').value * val)*100)/100;
		}
	}
	else if(curval == 7)
	{
		document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in TWD</strong>";
		for(i=37;i<=50;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdntwd').value * val)*100)/100;
		}
	}
	else if(curval == 8)
	{
		document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in BRL</strong>";
		for(i=37;i<=50;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnbrl').value * val)*100)/100;
		}
	}
	else if(curval == 9)
	{
		document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in SAR</strong>";
		for(i=37;i<=50;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnsar').value * val)*100)/100;
		}
	}
	else if(curval == 10)
	{
		document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in RUB</strong>";
		for(i=37;i<=50;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnrub').value * val)*100)/100;
		}
	}
	
}

function funChangeDes(val)
{
	var curval = document.getElementById('hdncurvalue').value;
	if(curval == 1)
	{
		document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in US$</strong>";
		for(i=54;i<=57;i++)
		{
			document.getElementById('td'+i).innerHTML = document.getElementById('hdn'+i).value * val;
		}
	}
	else if(curval == 2)
	{
		document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in EURO</strong>";
		for(i=54;i<=57;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdneuro').value * val)*100)/100;
		}
	}
	else if(curval == 3)
	{
		document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in GBP</strong>";
		for(i=54;i<=57;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdngbp').value * val)*100)/100;
		}
	}
	else if(curval == 4)
	{
		document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in JPY</strong>";
		for(i=54;i<=57;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnjpy').value * val)*100)/100;
		}
	}
	else if(curval == 5)
	{
		document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in CNY</strong>";
		for(i=54;i<=57;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdncny').value * val)*100)/100;
		}
	}
	else if(curval == 6)
	{
		document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in KRW</strong>";
		for(i=54;i<=57;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnkrw').value * val)*100)/100;
		}
	}
	else if(curval == 7)
	{
		document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in TWD</strong>";
		for(i=54;i<=57;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdntwd').value * val)*100)/100;
		}
	}
	else if(curval == 8)
	{
		document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in BRL</strong>";
		for(i=54;i<=57;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnbrl').value * val)*100)/100;
		}
	}
	else if(curval == 9)
	{
		document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in BRL</strong>";
		for(i=54;i<=57;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnsar').value * val)*100)/100;
		}
	}
	else if(curval == 10)
	{
		document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in BRL</strong>";
		for(i=54;i<=57;i++)
		{
			document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnrub').value * val)*100)/100;
		}
	}
}


function funchangecurrency(curval)
{
	document.getElementById('btnusd').src = 'images/curdollarbtn.png';
	document.getElementById('btneuro').src = 'images/cureurobtn.png';
	document.getElementById('btngbp').src = 'images/curgbpbtn.png';
	document.getElementById('btnjpy').src = 'images/curjpybtn.png';
	document.getElementById('btncny').src = 'images/curcnybtn.png';
	document.getElementById('btnkrw').src = 'images/curkrwbtn.png';
	document.getElementById('btntwd').src = 'images/curdollarbtn.png';
	document.getElementById('btnbrl').src = 'images/curbrlbtn.png';
	document.getElementById('btnsar').src = 'images/cursarbtn.png';
	document.getElementById('btnrub').src = 'images/currubbtn.png';
	
	var servcat = document.getElementById('hdnservcat').value;
	
	if(servcat == 1)
	{
		var val = document.getElementById('txtDays').value;
		if(curval == 1)
		{
			document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in US$</strong>";
			document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in US$</strong>";
			for(i=1;i<=26;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('txtDays').value)*100)/100;
			}
			document.getElementById('btnusd').src = 'images/curdollarbtnh.png';
			document.getElementById('hdncurvalue').value = 1;
			document.getElementById('tdcurtype').innerHTML = "US DOLLAR";
		}
		else if(curval == 2)
		{
			document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in EURO</strong>";
			document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in EURO</strong>";
			for(i=1;i<=26;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdneuro').value * document.getElementById('txtDays').value)*100)/100;
			}
			document.getElementById('btneuro').src = 'images/cureurobtnh.png';
			document.getElementById('hdncurvalue').value = 2;
			document.getElementById('tdcurtype').innerHTML = "EURO";
		}
		else if(curval == 3)
		{
			document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in GBP</strong>";
			document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in GBP</strong>";
			for(i=1;i<=26;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdngbp').value * document.getElementById('txtDays').value)*100)/100;
			}
			document.getElementById('btngbp').src = 'images/curgbpbtnh.png';
			document.getElementById('hdncurvalue').value = 3;
			document.getElementById('tdcurtype').innerHTML = "GBP";
		}
		else if(curval == 4)
		{
			document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in JPY</strong>";
			document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in JPY</strong>";
			for(i=1;i<=26;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnjpy').value * document.getElementById('txtDays').value)*100)/100;
			}
			document.getElementById('btnjpy').src = 'images/curjpybtnh.png';
			document.getElementById('hdncurvalue').value = 4;
			document.getElementById('tdcurtype').innerHTML = "JPY";
		}
		else if(curval == 5)
		{
			document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in CNY</strong>";
			document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in CNY</strong>";
			for(i=1;i<=26;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdncny').value * document.getElementById('txtDays').value)*100)/100;
			}
			document.getElementById('btncny').src = 'images/curcnybtnh.png';
			document.getElementById('hdncurvalue').value = 5;
			document.getElementById('tdcurtype').innerHTML = "CNY";
		}
		else if(curval == 6)
		{
			document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in KRW</strong>";
			document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in KRW</strong>";
			for(i=1;i<=26;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnkrw').value * document.getElementById('txtDays').value)*100)/100;
			}
			document.getElementById('btnkrw').src = 'images/curkrwbtnh.png';
			document.getElementById('hdncurvalue').value = 6;
			document.getElementById('tdcurtype').innerHTML = "KRW";
		}
		else if(curval == 7)
		{
			document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in TWD</strong>";
			document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in TWD</strong>";
			for(i=1;i<=26;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdntwd').value * document.getElementById('txtDays').value)*100)/100;
			}
			document.getElementById('btntwd').src = 'images/curdollarbtnh.png';
			document.getElementById('hdncurvalue').value = 7;
			document.getElementById('tdcurtype').innerHTML = "TWD";
		}
		else if(curval == 8)
		{
			document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in BRL</strong>";
			document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in BRL</strong>";
			for(i=1;i<=26;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnbrl').value * document.getElementById('txtDays').value)*100)/100;
			}
			document.getElementById('btnbrl').src = 'images/curbrlbtnh.png';
			document.getElementById('hdncurvalue').value = 8;
			document.getElementById('tdcurtype').innerHTML = "BRL";
		}	
		else if(curval == 9)
		{
			document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in SAR</strong>";
			document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in SAR</strong>";
			for(i=1;i<=26;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnsar').value * document.getElementById('txtDays').value)*100)/100;
			}
			document.getElementById('btnsar').src = 'images/cursarbtnh.png';
			document.getElementById('hdncurvalue').value = 9;
			document.getElementById('tdcurtype').innerHTML = "SAR";
		}	
		else if(curval == 10)
		{
			document.getElementById('tdeditprice').innerHTML = "<strong>Price for "+val+" page(s) in RUB</strong>";
			document.getElementById('tdeditresprice').innerHTML = "<strong>Price for "+val+" page(s) in RUB</strong>";
			for(i=1;i<=26;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnrub').value * document.getElementById('txtDays').value)*100)/100;
			}
			document.getElementById('btnrub').src = 'images/currubbtnh.png';
			document.getElementById('hdncurvalue').value = 10;
			document.getElementById('tdcurtype').innerHTML = "RUB";
		}	
	}
	else if(servcat == 3)
	{
		var val = document.getElementById('txtDaysFor').value;
		if(curval == 1)
		{
			document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in US$</strong>";
			for(i=37;i<=50;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('txtDaysFor').value)*100)/100;
			}
			document.getElementById('btnusd').src = 'images/curdollarbtnh.png';
			document.getElementById('hdncurvalue').value = 1;
			document.getElementById('tdcurtype').innerHTML = "US DOLLAR";
		}
		else if(curval == 2)
		{
			document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in EURO</strong>";
			for(i=37;i<=50;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdneuro').value * document.getElementById('txtDaysFor').value)*100)/100;
			}
			document.getElementById('btneuro').src = 'images/cureurobtnh.png';
			document.getElementById('hdncurvalue').value = 2;
			document.getElementById('tdcurtype').innerHTML = "EURO";
		}
		else if(curval == 3)
		{
			document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in GBP</strong>";
			for(i=37;i<=50;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdngbp').value * document.getElementById('txtDaysFor').value)*100)/100;
			}
			document.getElementById('btngbp').src = 'images/curgbpbtnh.png';
			document.getElementById('hdncurvalue').value = 3;
			document.getElementById('tdcurtype').innerHTML = "GBP";
		}
		else if(curval == 4)
		{
			document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in JPY</strong>";
			for(i=37;i<=50;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnjpy').value * document.getElementById('txtDaysFor').value)*100)/100;
			}
			document.getElementById('btnjpy').src = 'images/curjpybtnh.png';
			document.getElementById('hdncurvalue').value = 4;
			document.getElementById('tdcurtype').innerHTML = "JPY";
		}
		else if(curval == 5)
		{
			document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in CNY</strong>";
			for(i=37;i<=50;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdncny').value * document.getElementById('txtDaysFor').value)*100)/100;
			}
			document.getElementById('btncny').src = 'images/curcnybtnh.png';
			document.getElementById('hdncurvalue').value = 5;
			document.getElementById('tdcurtype').innerHTML = "CNY";
		}
		else if(curval == 6)
		{
			document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in KRW</strong>";
			for(i=37;i<=50;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnkrw').value * document.getElementById('txtDaysFor').value)*100)/100;
			}
			document.getElementById('btnkrw').src = 'images/curkrwbtnh.png';
			document.getElementById('hdncurvalue').value = 6;
			document.getElementById('tdcurtype').innerHTML = "KRW";
		}
		else if(curval == 7)
		{
			document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in TWD</strong>";
			for(i=37;i<=50;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdntwd').value * document.getElementById('txtDaysFor').value)*100)/100;
			}
			document.getElementById('btntwd').src = 'images/curdollarbtnh.png';
			document.getElementById('hdncurvalue').value = 7;
			document.getElementById('tdcurtype').innerHTML = "TWD";
		}
		else if(curval == 8)
		{
			document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in BRL</strong>";
			for(i=37;i<=50;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnbrl').value * document.getElementById('txtDaysFor').value)*100)/100;
			}
			document.getElementById('btnbrl').src = 'images/curbrlbtnh.png';
			document.getElementById('hdncurvalue').value = 8;
			document.getElementById('tdcurtype').innerHTML = "BRL";
		}
		else if(curval == 9)
		{
			document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in SAR</strong>";
			for(i=37;i<=50;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnsar').value * document.getElementById('txtDaysFor').value)*100)/100;
			}
			document.getElementById('btnsar').src = 'images/cursarbtnh.png';
			document.getElementById('hdncurvalue').value = 9;
			document.getElementById('tdcurtype').innerHTML = "SAR";
		}	
		else if(curval == 10)
		{
			document.getElementById('tdforprice').innerHTML = "<strong>Price for "+val+" page(s) in RUB</strong>";
			for(i=37;i<=50;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnrub').value * document.getElementById('txtDaysFor').value)*100)/100;
			}
			document.getElementById('btnrub').src = 'images/currubbtnh.png';
			document.getElementById('hdncurvalue').value = 10;
			document.getElementById('tdcurtype').innerHTML = "RUB";
		}	
	}
	else if(servcat == 4)
	{
		var val = document.getElementById('txtDaysDes').value;
		if(curval == 1)
		{
			document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in US$</strong>";
			document.getElementById('tdposterprice').innerHTML = "<strong>Price for "+val+" page(s) in US$</strong>";
			for(i=54;i<=57;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('txtDaysDes').value)*100)/100;
			}
			for(j=51;j<=53;j++)
			{
				document.getElementById('td'+j).innerHTML = Math.round((document.getElementById('hdn'+j).value)*100)/100;
			}
			document.getElementById('btnusd').src = 'images/curdollarbtnh.png';
			document.getElementById('hdncurvalue').value = 1;
			document.getElementById('tdcurtype').innerHTML = "US DOLLAR";
		}
		else if(curval == 2)
		{
			document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in EURO</strong>";
			document.getElementById('tdposterprice').innerHTML = "<strong>Price for "+val+" page(s) in EURO</strong>";
			for(i=54;i<=57;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdneuro').value * document.getElementById('txtDaysDes').value)*100)/100;
			}
			for(j=51;j<=53;j++)
			{
				document.getElementById('td'+j).innerHTML = Math.round((document.getElementById('hdn'+j).value * document.getElementById('hdneuro').value)*100)/100;
			}
			document.getElementById('btneuro').src = 'images/cureurobtnh.png';
			document.getElementById('hdncurvalue').value = 2;
			document.getElementById('tdcurtype').innerHTML = "EURO";
		}
		else if(curval == 3)
		{
			document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in GBP</strong>";
			document.getElementById('tdposterprice').innerHTML = "<strong>Price for "+val+" page(s) in GBP</strong>";
			for(i=54;i<=57;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdngbp').value * document.getElementById('txtDaysDes').value)*100)/100;
			}
			for(j=51;j<=53;j++)
			{
				document.getElementById('td'+j).innerHTML = Math.round((document.getElementById('hdn'+j).value * document.getElementById('hdngbp').value)*100)/100;
			}
			document.getElementById('btngbp').src = 'images/curgbpbtnh.png';
			document.getElementById('hdncurvalue').value = 3;
			document.getElementById('tdcurtype').innerHTML = "GBP";
		}
		else if(curval == 4)
		{
			document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in JPY</strong>";
			document.getElementById('tdposterprice').innerHTML = "<strong>Price for "+val+" page(s) in JPY</strong>";
			for(i=54;i<=57;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnjpy').value * document.getElementById('txtDaysDes').value)*100)/100;
			}
			for(j=51;j<=53;j++)
			{
				document.getElementById('td'+j).innerHTML = Math.round((document.getElementById('hdn'+j).value * document.getElementById('hdnjpy').value)*100)/100;
			}
			document.getElementById('btnjpy').src = 'images/curjpybtnh.png';
			document.getElementById('hdncurvalue').value = 4;
			document.getElementById('tdcurtype').innerHTML = "JPY";
		}
		else if(curval == 5)
		{
			document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in CNY</strong>";
			document.getElementById('tdposterprice').innerHTML = "<strong>Price for "+val+" page(s) in CNY</strong>";
			for(i=54;i<=57;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdncny').value * document.getElementById('txtDaysDes').value)*100)/100;
			}
			for(j=51;j<=53;j++)
			{
				document.getElementById('td'+j).innerHTML = Math.round((document.getElementById('hdn'+j).value * document.getElementById('hdncny').value)*100)/100;
			}
			document.getElementById('btncny').src = 'images/curcnybtnh.png';
			document.getElementById('hdncurvalue').value = 5;
			document.getElementById('tdcurtype').innerHTML = "CNY";
		}
		else if(curval == 6)
		{
			document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in KRW</strong>";
			document.getElementById('tdposterprice').innerHTML = "<strong>Price for "+val+" page(s) in KRW</strong>";
			for(i=54;i<=57;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnkrw').value * document.getElementById('txtDaysDes').value)*100)/100;
			}
			for(j=51;j<=53;j++)
			{
				document.getElementById('td'+j).innerHTML = Math.round((document.getElementById('hdn'+j).value * document.getElementById('hdnkrw').value)*100)/100;
			}
			document.getElementById('btnkrw').src = 'images/curkrwbtnh.png';
			document.getElementById('hdncurvalue').value = 6;
			document.getElementById('tdcurtype').innerHTML = "KRW";
		}
		else if(curval == 7)
		{
			document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in TWD</strong>";
			document.getElementById('tdposterprice').innerHTML = "<strong>Price for "+val+" page(s) in TWD</strong>";
			for(i=54;i<=57;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdntwd').value * document.getElementById('txtDaysDes').value)*100)/100;
			}
			for(j=51;j<=53;j++)
			{
				document.getElementById('td'+j).innerHTML = Math.round((document.getElementById('hdn'+j).value * document.getElementById('hdntwd').value)*100)/100;
			}
			document.getElementById('btntwd').src = 'images/curdollarbtnh.png';
			document.getElementById('hdncurvalue').value = 7;
			document.getElementById('tdcurtype').innerHTML = "TWD";
		}
		else if(curval == 8)
		{
			document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in BRL</strong>";
			document.getElementById('tdposterprice').innerHTML = "<strong>Price for "+val+" page(s) in BRL</strong>";
			for(i=54;i<=57;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnbrl').value * document.getElementById('txtDaysDes').value)*100)/100;
			}
			for(j=51;j<=53;j++)
			{
				document.getElementById('td'+j).innerHTML = Math.round((document.getElementById('hdn'+j).value * document.getElementById('hdnbrl').value)*100)/100;
			}
			document.getElementById('btnbrl').src = 'images/curbrlbtnh.png';
			document.getElementById('hdncurvalue').value = 8;
			document.getElementById('tdcurtype').innerHTML = "BRL";
		}	
		else if(curval == 9)
		{
			document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in SAR</strong>";
			document.getElementById('tdposterprice').innerHTML = "<strong>Price for "+val+" page(s) in SAR</strong>";
			for(i=54;i<=57;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnsar').value * document.getElementById('txtDaysDes').value)*100)/100;
			}
			for(j=51;j<=53;j++)
			{
				document.getElementById('td'+j).innerHTML = Math.round((document.getElementById('hdn'+j).value * document.getElementById('hdnsar').value)*100)/100;
			}
			document.getElementById('btnsar').src = 'images/cursarbtnh.png';
			document.getElementById('hdncurvalue').value = 9;
			document.getElementById('tdcurtype').innerHTML = "SAR";
		}	
		else if(curval == 10)
		{
			document.getElementById('tddesprice').innerHTML = "<strong>Price for "+val+" page(s) in RUB</strong>";
			document.getElementById('tdposterprice').innerHTML = "<strong>Price for "+val+" page(s) in RUB</strong>";
			for(i=54;i<=57;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnrub').value * document.getElementById('txtDaysDes').value)*100)/100;
			}
			for(j=51;j<=53;j++)
			{
				document.getElementById('td'+j).innerHTML = Math.round((document.getElementById('hdn'+j).value * document.getElementById('hdnrub').value)*100)/100;
			}
			document.getElementById('btnrub').src = 'images/currubbtnh.png';
			document.getElementById('hdncurvalue').value = 10;
			document.getElementById('tdcurtype').innerHTML = "RUB";
		}	
	}
	else if(servcat == 5)
	{
		if(curval == 1)
		{
			document.getElementById('tdpublishprice').innerHTML = "<strong>Price per assignment in US$</strong>";
			for(i=58;i<=62;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value)*100)/100;
			}
			document.getElementById('btnusd').src = 'images/curdollarbtnh.png';
			document.getElementById('hdncurvalue').value = 1;
			document.getElementById('tdcurtype').innerHTML = "US DOLLAR";
		}
		else if(curval == 2)
		{
			document.getElementById('tdpublishprice').innerHTML = "<strong>Price per assignment in EURO</strong>";
			for(i=58;i<=62;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdneuro').value)*100)/100;
			}
			document.getElementById('btneuro').src = 'images/cureurobtnh.png';
			document.getElementById('hdncurvalue').value = 2;
			document.getElementById('tdcurtype').innerHTML = "EURO";
		}
		else if(curval == 3)
		{
			document.getElementById('tdpublishprice').innerHTML = "<strong>Price per assignment in GBP</strong>";
			for(i=58;i<=62;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdngbp').value)*100)/100;
			}
			document.getElementById('btngbp').src = 'images/curgbpbtnh.png';
			document.getElementById('hdncurvalue').value = 3;
			document.getElementById('tdcurtype').innerHTML = "GBP";
		}
		else if(curval == 4)
		{
			document.getElementById('tdpublishprice').innerHTML = "<strong>per assignment in JPY</strong>";
			for(i=58;i<=62;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnjpy').value)*100)/100;
			}
			document.getElementById('btnjpy').src = 'images/curjpybtnh.png';
			document.getElementById('hdncurvalue').value = 4;
			document.getElementById('tdcurtype').innerHTML = "JPY";
		}
		else if(curval == 5)
		{
			document.getElementById('tdpublishprice').innerHTML = "<strong>per assignment in CNY</strong>";
			for(i=58;i<=62;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdncny').value)*100)/100;
			}
			document.getElementById('btncny').src = 'images/curcnybtnh.png';
			document.getElementById('hdncurvalue').value = 5;
			document.getElementById('tdcurtype').innerHTML = "CNY";
		}
		else if(curval == 6)
		{
			document.getElementById('tdpublishprice').innerHTML = "<strong>per assignment in KRW</strong>";
			for(i=58;i<=62;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnkrw').value)*100)/100;
			}
			document.getElementById('btnkrw').src = 'images/curkrwbtnh.png';
			document.getElementById('hdncurvalue').value = 6;
			document.getElementById('tdcurtype').innerHTML = "KRW";
		}
		else if(curval == 7)
		{
			document.getElementById('tdpublishprice').innerHTML = "<strong>per assignment in TWD</strong>";
			for(i=58;i<=62;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdntwd').value)*100)/100;
			}
			document.getElementById('btntwd').src = 'images/curdollarbtnh.png';
			document.getElementById('hdncurvalue').value = 7;
			document.getElementById('tdcurtype').innerHTML = "TWD";
		}
		else if(curval == 8)
		{
			document.getElementById('tdpublishprice').innerHTML = "<strong>per assignment in BRL</strong>";
			for(i=58;i<=62;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnbrl').value)*100)/100;
			}
			document.getElementById('btnbrl').src = 'images/curbrlbtnh.png';
			document.getElementById('hdncurvalue').value = 8;
			document.getElementById('tdcurtype').innerHTML = "BRL";
		}	
		else if(curval == 9)
		{
			document.getElementById('tdpublishprice').innerHTML = "<strong>per assignment in SAR</strong>";
			for(i=58;i<=62;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnsar').value)*100)/100;
			}
			document.getElementById('btnsar').src = 'images/cursarbtnh.png';
			document.getElementById('hdncurvalue').value = 9;
			document.getElementById('tdcurtype').innerHTML = "SAR";
		}	
		else if(curval == 10)
		{
			document.getElementById('tdpublishprice').innerHTML = "<strong>per assignment in RUB</strong>";
			for(i=58;i<=62;i++)
			{
				document.getElementById('td'+i).innerHTML = Math.round((document.getElementById('hdn'+i).value * document.getElementById('hdnrub').value)*100)/100;
			}
			document.getElementById('btnrub').src = 'images/currubbtnh.png';
			document.getElementById('hdncurvalue').value = 10;
			document.getElementById('tdcurtype').innerHTML = "RUB";
		}
	}
}

/*-------------------end calculation ---------------------*/

/*-------------IM show--------------------*/
function funIMshow(imval)
{
	if(imval != '')
	{
		document.getElementById('imtbl').style.display = 'block';
	}
	else
	{
		document.getElementById('imtbl').style.display = 'none';
	}
}

/*-------------end IM ------------------*/
