﻿ 
 
 
 
// window.onload=showFlashAd;function window_onload(){window.name=''}function window_onfocus(){if(window.name=='s'){document.aspnetForm.submit();window.name=''}}function ImageRefresh(w){document.getElementById('\u0069\u006dgT\u0075ri\156g').src=w+"?"+Math.random()+"=3";}function setimage(id){window.open('g\145\155\u0053to\u006e\u0065\u0049\u006dages\056aspx?g\u0065\u006d\u0069d\u003d'+id,'\u006eewwi\156\144\u006f\u0077','\167\151d\164h=5\0600\u0070\u0078\u002ch\145i\147h\u0074\u003d47\060p\u0078\u003b');}function showDivLeft(name){if(!e){var e=window.event||arguments.callee.caller.arguments[0];}var scrolledV=scrollV();var scrolledH=(navigator.appName=='N\145t\u0073c\u0061pe')?document.body.scrollLeft:document.body.scrollLeft;tempX=(navigator.appName=='Ne\u0074\163\143\141\160e')?e.clientX:event.clientX;tempY=(navigator.appName=='\u004eetsc\141\160e')?e.clientY:event.clientY;document.getElementById(name).style.left=(tempX-250)+'\u0070x';document.getElementById(name).style.top=(tempY+scrolledV)+'px';document.getElementById(name).style.display="";}function showManageDivLeft(name){if(!e){var e=window.event||arguments.callee.caller.arguments[0];}var scrolledV=scrollV();var scrolledH=(navigator.appName=='N\145\164sca\u0070e')?document.body.scrollLeft:document.body.scrollLeft;tempX=(navigator.appName=='N\u0065t\u0073c\u0061pe')?e.clientX:event.clientX;tempY=(navigator.appName=='Ne\164s\143a\160e')?e.clientY:event.clientY;document.getElementById(name).style.left=(tempX+750)+'\u0070x';document.getElementById(name).style.top=(tempY+scrolledV)+'px';document.getElementById(name).style.display="";}function HideDiv(id){if(document.getElementById(id))document.getElementById(id).style.display="no\156e";}function ClientValidate(source,arguments){if(document.getElementById("c\164l\u0030\060\u005fCont\145nt\u0050\154\141\143\u0065Hol\u0064e\u00721_\u006cst\142\u0078\u0064\145a\u006ci\u006e").value=="1"){var trimvalue=trim(arguments.Value);if(trimvalue.length==0){arguments.IsValid=false;}else arguments.IsValid=true;}else arguments.IsValid=true;}function openSubscription(id){window.open("a\144\144\u0053\u0075bfeefo\u0072Publicati\u006f\156.as\160x?b\157oki\144="+id,'n\u0065\167\u0077\151ndo\167',"tool\u0062a\u0072=\u006e\u006f\u002cmenu\142\u0061r=\u006eo\u002cscroll\142ars=n\u006f\u002c\u0077\u0069\u0064\u0074h\0755\066\u0030\160\u0078,\150eight\u003d3\0600p\170");}function Redirect(id,ctl){var id=document.getElementById(id).value;ctl.href="searc\150Da\u0074\u0061\142\141\163e.\u0061\u0073\160x\077k\u0065\u0079w\157rd="+id;}function ShowName(){var now=new Date();var hour=now.getHours();var minute=now.getMinutes();var time=hour+"\u003a"+minute;document.getElementById('\u0073pn\u0054im\u0065').innerHTML=time;}function enterPressed(e,ctrlname){if(e.keyCode==13){document.getElementById(ctrlname).click();}}function clearText(ctl1){document.getElementById("\u0063\u0074\u006c\u00300_Con\164en\u0074Pla\143\145\110ol\u0064\u0065r1_"+ctl1).value="";}function ShowDiv(id){if(document.getElementById(id))document.getElementById(id).style.display="";}function HideDiv1(id){document.getElementById('d\151\166D\u0065tails').style.display="no\u006ee";}function ShowDiv1(){document.getElementById('\u0064i\u0076\104e\164\141i\u006c\163').style.display='';}function chkall(ival){var obj=document.getElementById("ctl0\u0030\u005fCo\156\u0074\145nt\u0050lac\u0065\110\u006flder\061_dgMa\u0069\u006c\u0073");for(var i=0;i<obj.getElementsByTagName("i\u006ep\u0075\u0074").length;i++){if(obj.getElementsByTagName("inp\165t").item(i).type=="\143\150\145ckbox"){obj.getElementsByTagName("inpu\u0074").item(i).checked=ival;}}}function scrollV(){var scrolledV;if(window.pageYOffset){scrolledV=window.pageYOffset;}else if(document.documentElement&&document.documentElement.scrollTop){scrolledV=document.documentElement.scrollTop;}else if(document.body){scrolledV=document.body.scrollTop;}return scrolledV;}function Getchecked(ctl,id){var i;var j=2;var a=new Array();var newa=new Array();var chkcount=document.getElementById('\u0063\u0074\1540\060\137\103ont\u0065nt\u0050l\141\u0063eH\157lde\u00721_\110i\144Ch\153\103o\u0075n\u0074').value;chkcount++;chkcount--;if(ctl.checked==true){if(document.getElementById('ctl00\u005fC\u006fn\u0074e\156t\u0050\u006caceHold\u0065r1_Hdn\120os\164\111d').value==0)document.getElementById('c\u0074l\u00300_C\u006f\156tentP\u006c\u0061\u0063\145Hold\145\1621_\110\144\u006eP\157\u0073tId').value=id;else document.getElementById('\u0063\u0074l00_C\157nte\156\u0074\u0050l\u0061c\u0065\u0048\157\u006c\144er1_Hdn\u0050o\u0073tId').value=document.getElementById('c\u0074\154\u0030\u0030_Cont\145\156t\u0050\154\141c\u0065H\u006f\u006cder\061_\u0048dnP\u006f\u0073\164I\u0064').value+"\u002c"+id;document.getElementById('ctl00_Conte\u006e\u0074\120\u006cac\145\110\u006f\u006c\u0064e\u00721\u005fHidChkC\157\u0075\u006e\u0074').value=chkcount+1;}if(ctl.checked==false){if(document.getElementById('ctl\060\u0030_C\u006f\u006e\u0074entP\154ac\u0065Hold\145r1_HdnP\157s\164\111\u0064').value!=0){var str=document.getElementById('\u0063\164\154\u00300_C\157nte\u006e\u0074Pl\141\u0063eHolde\162\u0031_Hd\156P\u006fs\u0074\u0049\u0064').value;document.getElementById('\143t\u006c00_Cont\u0065n\164\120l\141c\145H\157ld\u0065r1\137HdnP\u006fs\u0074Id').value='0';a=str.split(",");var iloop=a.length-1;var j=0;for(i=0;i<=iloop;i++){if(a[i]!=id){newa[j]=a[i];j++;}}}iloop=newa.length-1;for(i=0;i<=iloop;i++){if(i==0){if(iloop==0)document.getElementById('ctl\u0030\060_Cont\u0065ntPlaceH\157lder1\u005f\u0048dn\120ost\111\u0064').value=newa[i];else document.getElementById('c\u0074\u006c\060\u0030_\103\157n\u0074e\156t\u0050la\143eH\u006fl\u0064er1_\110d\156Po\u0073tI\u0064').value=newa[i]+",";}else if(i!=iloop)document.getElementById('ct\154\060\u0030\u005fC\u006fn\u0074en\u0074\120lace\u0048o\154der1\137Hd\u006ePostId').value=document.getElementById('\u0063t\u006c00_\u0043on\u0074e\156t\120lace\u0048old\u0065\1621_\u0048\144nPostId').value+newa[i]+",";else document.getElementById('ctl00_\103o\156t\145ntP\u006c\u0061ce\u0048\157lde\162\u0031\u005f\110d\156Post\111\144').value=document.getElementById('c\164\u006c00\u005f\u0043\157n\u0074e\156tPl\141\u0063\u0065Hol\u0064\u0065r1_Hd\u006ePost\111d').value+newa[i]}document.getElementById('ctl\u00300_\u0043on\164\u0065ntPla\143e\110\157\u006cde\162\u0031_\u0048idCh\u006b\u0043\157unt').value=chkcount-1;}document.getElementById('ctl\u00300_\u0043\u006f\156te\u006et\120l\u0061ceHo\154\144\u0065\u00721\137\u006citch\u006bc\u006fun\164').innerHTML=document.getElementById('\143\u0074l\u00300_Con\u0074e\156tPla\u0063e\u0048\157lder\u0031_Hi\u0064\103hk\u0043ou\u006et').value;}function checkList(ctl){}function showFloatDiv(name){if(!e){var e=window.event||arguments.callee.caller.arguments[0];}var scrolledV=scrollV();var scrolledH=(navigator.appName=='N\145\164\u0073\143a\u0070e')?document.body.scrollLeft:document.body.scrollLeft;tempX=(navigator.appName=='Ne\164\u0073\u0063\141\160\145')?e.clientX:event.clientX;tempY=(navigator.appName=='Netsca\160\u0065')?e.clientY:event.clientY;document.getElementById(name).style.left=(tempX+scrolledH)+'px';document.getElementById(name).style.top=(tempY+scrolledV)+'px';document.getElementById(name).style.display="";}function showFloatDivSearch(name,id,cell,parentDiv){var old=document.getElementById("\150id\115ou\163e").value;document.getElementById("\150\151dM\157u\u0073e").value=id;if(!e){var e=window.event||arguments.callee.caller.arguments[0];}var scrolledV=scrollV();var scrolledH=(navigator.appName=='\116etsc\141\160e')?document.body.scrollLeft:document.body.scrollLeft;tempX=(navigator.appName=='Netsca\u0070\u0065')?e.clientX:event.clientX;tempY=(navigator.appName=='Ne\u0074s\143ape')?e.clientY:event.clientY;var left=document.getElementById("d\166i\u006ed"+id).offsetLeft;var width=document.getElementById("d\166\151\u006ed"+id).offsetWidth;var top=document.getElementById("d\u0076\151nd"+id).offsetTop;document.getElementById("\144\u0069vIndia\143a\164\u0065").style.top=(top-5)+'px';document.getElementById(name).style.top=(top-5)+'px';document.getElementById("div\u0049nd\151a\u0063\141t\u0065").style.left=(left+760)+'p\170';document.getElementById(name).style.left=(left+785)+'px';var bodyHeight=0;var bodyTop=document.body.offsetTop;var bodyHeight=document.body.offsetHeight;var bodywidth=document.body.offsetWidth;var bodyBottom=bodyTop+bodyHeight;var parentTop=document.getElementById(parentDiv).offsetTop;var parentHeight=document.getElementById(parentDiv).offsetHeight;var parentWidth=document.getElementById(parentDiv).offsetWidth;var parentLeft=document.getElementById(parentDiv).offsetLeft;var cleft=((bodywidth)*82)/100;var parentBottom=parentTop+parentHeight;var mainHeight=document.getElementById(name).offsetHeight;var mainTop=(top-5);var mainBottom=mainHeight+mainTop;if(document.getElementById("d\u0069\u0076B\u006f\u0074to\155")){}var checktop=mainTop-mainHeight+2;if(mainBottom>(parentBottom+10)){if(parentHeight>mainHeight&&mainBottom>1060)document.getElementById(name).style.top=(mainTop-mainHeight+2)+'p\170';else if(mainBottom>1060)document.getElementById(name).style.top=(mainTop-mainHeight-50)+'p\170';}document.getElementById(name).style.display="";document.getElementById("d\u0069\u0076\111\u006ed\u0069ac\u0061\164\u0065").style.display="";}function getWindowSize(){var x,y;if(self.innerHeight){x=self.innerWidth;y=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){x=document.documentElement.clientWidth;y=document.documentElement.clientHeight;}else if(document.body){x=document.body.clientWidth;y=document.body.clientHeight;}return[x,y];}function showFloatDivImage(name){if(!e){var e=window.event||arguments.callee.caller.arguments[0];}var scrolledV=scrollV();var scrolledH=(navigator.appName=='\116et\163\143ape')?document.body.scrollLeft:document.body.scrollLeft;tempX=(navigator.appName=='\u004e\u0065t\163\u0063a\160e')?e.clientX:event.clientX;tempY=(navigator.appName=='\u004eetscape')?e.clientY:event.clientY;document.getElementById(name).style.left=(tempX+scrolledH+50)+'px';document.getElementById(name).style.top=(tempY+scrolledV+15)+'px';document.getElementById(name).style.display="";}function t1(t1){var valt1=t1.value;trimvalue=trim(valt1);if(trimvalue.length==0){return false;}else{return true;}}function previewimage(path,imgid,err,errimg){var strpath;strpath=document.getElementById(path).value;var trimvalue=trim(strpath);if(trimvalue.length==0){document.getElementById(err).style.color='\u0072\u0065\u0064';document.getElementById(err).style.display='';document.getElementById(errimg).style.display='n\u006f\u006ee';return false;}else{var imgtype=new Array();imgtype=strpath.split("\u002e");if(imgtype.length>1){var len=imgtype.length;len++;len--;var type=imgtype[len-1].toLowerCase();if(type=='b\u006dp'||type=='\u006a\160\u0067'||type=='jpeg'||type=='png'||type=='\147if'){document.getElementById(imgid).style.display='';document.getElementById(err).style.display='\u006e\157ne';document.getElementById(errimg).style.display='n\u006fn\u0065';document.getElementById(imgid).src="fi\154e:\u002f\u002f/"+strpath;return true;}else{document.getElementById(errimg).style.color='\162ed';document.getElementById(errimg).style.display='';document.getElementById(err).style.display='\156\157ne';return false;}}else{document.getElementById(errimg).style.color='red';document.getElementById(errimg).style.display='';document.getElementById(err).style.display='n\u006fne';return false;}}}function trim(value){var temp=value;var obj=/^(\s*)([\W\w]*)(\b\s*$)/;if(obj.test(temp)){temp=temp.replace(obj,'\044\u0032');}var obj=/ +/g;temp=temp.replace(obj," ");if(temp==" "){temp="";}return temp;};function checkblank(txt,err){var txtvalue=document.getElementById(txt).value;var trimvalue=trim(txtvalue);if(trimvalue.length==0){document.getElementById(err).style.color='red';document.getElementById(err).style.display='';return false;}else{document.getElementById(err).style.display='no\u006ee';return true;}};function validateInteger(strValue,isdecimal){if(isdecimal==0){var objRegExp=/(^-?\d\d*$)/;return objRegExp.test(strValue);}else{return true;}}function HideAll(){}function toggle(trigger,el,ex,colapse){var element=document.getElementById(el);if(element.style.display=="no\u006ee"){element.style.display="";trigger.src='.\056/g\146x\057\u006di\u006e\u0075\u0073\056\147if';trigger.alt=colapse;}else{element.style.display="\u006eon\145";trigger.src='\u002e\u002e/gfx/p\u006cus.g\u0069f';trigger.alt=ex;}}function toggle1(trigger,el,ex,colapse){var element=document.getElementById(el);if(element.style.display=="\156\u006fne"){element.style.display="";trigger.src='gf\170/\u006dinus\056gif';trigger.alt=colapse;}else{element.style.display="none";trigger.src='\u0067\u0066x/p\154\u0075s\u002e\u0067if';trigger.alt=ex;}}function myClick(clt){if(clt.value=="\u004da\170"||clt.value=="\115in"){clt.value='';}}function image_resize(){window.name='';if(document.getElementById("\164b\u006cFix\u0049m\147")){var pix=document.getElementById("\u0074blF\u0069x\u0049m\147").getElementsByTagName('\151m\u0067');for(i=0;i<pix.length;i++){if(pix[i].name!='no'){if(pix[i].height>80)pix[i].height=80;if(pix[i].width>80)pix[i].width=80;}}}if(document.getElementById("\164\142lFi\170Im\1471")){var pix=document.getElementById("\u0074\u0062lF\u0069x\u0049mg\061").getElementsByTagName('i\u006dg');for(i=0;i<pix.length;i++){if(pix[i].name!='n\u006f'){if(pix[i].height>100)pix[i].height=100;if(pix[i].width>100)pix[i].width=100;}}}}function FlashObjectClick(pageid,id){document.getElementById("\u0066lash\151mg").src="\u006e\u0061\166iga\164ead\u002ea\163\u0070x?im\u0067=l\u0026n\u0061\u0076\151gate\165\u0072l\075\u006cll&a\u0064ver\u0074is\u0065m\145n\164="+id+"\046p\141\u0067eid="+pageid;}function showFlashAd(){if(document.getElementById("d\166AdH\u0065ad"))document.getElementById("dvA\u0064\u0048e\141d").style.display='';}
 
 window.onload = showFlashAd;
 
function window_onload() {
 window.name =''
} 

    function window_onfocus() {

  if (window.name == 's') 
  { 
  document.aspnetForm.submit();
  window.name ='' 
  }
}


function ImageRefresh(w)
  { 
  document.getElementById('imgTuring').src=w + "?" +Math.random() +"=3" ;
  }

function setimage(id)
{
 window.open('gemStoneImages.aspx?gemid=' + id,'newwindow','width=500px,height=470px;');
}

function showDivLeft(name)
{	
    
	if (!e)
       {
        var e=window.event || arguments.callee.caller.arguments[0];            	 
       }

      var	scrolledV=scrollV() ;
   
       var	scrolledH = (navigator.appName == 'Netscape') ? document.body.scrollLeft : document.body.scrollLeft;
      tempX = (navigator.appName == 'Netscape') ? e.clientX : event.clientX;
      tempY = (navigator.appName == 'Netscape') ? e.clientY : event.clientY;
	
 
	document.getElementById(name).style.left=(tempX- 250)+'px';
			document.getElementById(name).style.top=(tempY+scrolledV)+'px';
      document.getElementById(name).style.display="";
    

	}

function showManageDivLeft(name)
{	
    
	if (!e)
       {
        var e=window.event || arguments.callee.caller.arguments[0];            	 
       }

      var	scrolledV=scrollV() ;
   
       var	scrolledH = (navigator.appName == 'Netscape') ? document.body.scrollLeft : document.body.scrollLeft;
      tempX = (navigator.appName == 'Netscape') ? e.clientX : event.clientX;
      tempY = (navigator.appName == 'Netscape') ? e.clientY : event.clientY;
	
 
	document.getElementById(name).style.left=(tempX+750)+'px';
			document.getElementById(name).style.top=(tempY+scrolledV)+'px';
      document.getElementById(name).style.display="";
    

	}

function HideDiv(id)
{
    if(document.getElementById(id))
  document.getElementById(id).style.display="none" ;
}
function ClientValidate(source, arguments)
       {
         if( document.getElementById("ctl00_ContentPlaceHolder1_lstbxdealin").value=="1")
          {
          var trimvalue=trim(arguments.Value);
          if(trimvalue.length==0)
          {
          arguments.IsValid = false;
          }
          else
             arguments.IsValid = true; 
          }
          else
            arguments.IsValid = true;
       }

function openPopup(id,flag)
{
   window.open("getresource.aspx?fileid=" + id +"&flag=40",'newwindow',"location=no,toolbar=no,menubar=no,scrollbars=no,width=560px,height=300px");
}
function openSubscription(id)
{
   window.open("addSubfeeforPublication.aspx?bookid=" + id,'newwindow',"toolbar=no,menubar=no,scrollbars=no,width=560px,height=300px");
}
function Redirect(id,ctl)
{
  var id  =document.getElementById(id).value; 
 ctl.href="searchDatabase.aspx?keyword=" + id;
}
function ShowName()
{
  /*this code commentise but it is useful for other work dont delete it*/
//var i,text;

//i=document.getElementById('lstbxUsers')
//var trimvalue=trim(i.value);

// if(trimvalue.length==0)
//		{
//		 alert("Please Select user from the list.");
//   return;
//		}

//var t=i.getElementsByTagName("option");



//for(count=0;count<t.length;count++)
//{
//if(t[count].value==i.value)
//text=t[count].innerText;
//}
//var splitArray=new Array();
//   splitArray=text.split('-');
//   if(splitArray.length>0)
//      text=splitArray[0];
//      
//    document.getElementById('spnName').innerHTML= text;
 
 var now = new Date();
var hour = now.getHours();

var minute = now.getMinutes();
var time= hour +":"+ minute
//

document.getElementById('spnTime').innerHTML=time;
   
   }

function enterPressed(e,ctrlname)
{

  if (e.keyCode==13)
  {
	document.getElementById(ctrlname).click();
  }	

}
function clearText(ctl1)
{
document.getElementById("ctl00_ContentPlaceHolder1_" +ctl1).value="";
}
function ShowDiv(id)
{
   if(document.getElementById(id))
   document.getElementById(id).style.display="";
}
function HideDiv1(id)
{
  document.getElementById('divDetails').style.display="none" ;
  
}

function ShowDiv1()
{
   document.getElementById('divDetails').style.display='';
}

function chkall(ival)
	{
		var obj= document.getElementById("ctl00_ContentPlaceHolder1_dgMails");
		for(var i=0; i<obj.getElementsByTagName("input").length ;i++ )
		{
			if(obj.getElementsByTagName("input").item(i).type == "checkbox" )	
		    {
		        obj.getElementsByTagName("input").item(i).checked=ival;	
			}	
		} 
	}

function scrollV()
{
var scrolledV;
if (window.pageYOffset)
{
	   	scrolledV  = window.pageYOffset;
}
else if (document.documentElement && document.documentElement.scrollTop)
{
	 	scrolledV  = document.documentElement.scrollTop;
}
else if (document.body)
{
	   	scrolledV  = document.body.scrollTop;
}
return scrolledV;
}
function Getchecked(ctl,id)
	{
		var i;
		var j=2;
		
		var a=new Array();
		var newa=new Array();		
		var chkcount=document.getElementById('ctl00_ContentPlaceHolder1_HidChkCount').value;
		
		chkcount++;
		chkcount--;
		
		if(ctl.checked==true)
		{
		    if(document.getElementById('ctl00_ContentPlaceHolder1_HdnPostId').value==0)
		    document.getElementById('ctl00_ContentPlaceHolder1_HdnPostId').value=id;
		else
		    document.getElementById('ctl00_ContentPlaceHolder1_HdnPostId').value=document.getElementById('ctl00_ContentPlaceHolder1_HdnPostId').value + "," + id;
		    document.getElementById('ctl00_ContentPlaceHolder1_HidChkCount').value= chkcount+1;		
		}
		
		if(ctl.checked==false)
		{
		    if(document.getElementById('ctl00_ContentPlaceHolder1_HdnPostId').value!=0)
		    {
		        var str =document.getElementById('ctl00_ContentPlaceHolder1_HdnPostId').value;
		        document.getElementById('ctl00_ContentPlaceHolder1_HdnPostId').value='0';
		        a=str.split(",");
		        var iloop=a.length-1
		        var j=0;
		        for(i=0;i<=iloop;i++)
		        {
		            if(a[i]!=id)
		            {
		                newa[j]=a[i];
		                j++;
		            }   
		        }
		    }
	
		iloop=newa.length-1
		for(i=0;i<=iloop;i++)
		{
		   if(i==0)
		    {
		      if(iloop==0)
				document.getElementById('ctl00_ContentPlaceHolder1_HdnPostId').value=newa[i];
			  else
				document.getElementById('ctl00_ContentPlaceHolder1_HdnPostId').value=newa[i] + ",";
			}
		else if(i!=iloop)
	   		   document.getElementById('ctl00_ContentPlaceHolder1_HdnPostId').value=document.getElementById('ctl00_ContentPlaceHolder1_HdnPostId').value + newa[i] + "," ;
		else
			  document.getElementById('ctl00_ContentPlaceHolder1_HdnPostId').value=document.getElementById('ctl00_ContentPlaceHolder1_HdnPostId').value + newa[i]
		}
		    document.getElementById('ctl00_ContentPlaceHolder1_HidChkCount').value= chkcount-1;
			
		}
		
		    document.getElementById('ctl00_ContentPlaceHolder1_litchkcount').innerHTML= document.getElementById('ctl00_ContentPlaceHolder1_HidChkCount').value;
		  
	}
	
	function checkList(ctl)
	{	 
	}
function showFloatDiv(name)
{	
   
	if (!e)
       {
        var e=window.event || arguments.callee.caller.arguments[0];            	 
       }
 
      var	scrolledV=scrollV() ;
   
       var	scrolledH = (navigator.appName == 'Netscape') ? document.body.scrollLeft : document.body.scrollLeft;
      tempX = (navigator.appName == 'Netscape') ? e.clientX : event.clientX;
      tempY = (navigator.appName == 'Netscape') ? e.clientY : event.clientY;

 
	document.getElementById(name).style.left=(tempX+scrolledH)+'px';
		
			document.getElementById(name).style.top=(tempY+scrolledV)+'px';
      document.getElementById(name).style.display="";
     

	}
	function showFloatDivSearch(name,id,cell,parentDiv)
{	
   var old=	document.getElementById("hidMouse").value;
  // if(id==old)
  //  return;
 
    document.getElementById("hidMouse").value=id;
   
   
	if (!e)
       {
        var e=window.event || arguments.callee.caller.arguments[0];            	 
       }
 
      var	scrolledV=scrollV() ;
   
       var	scrolledH = (navigator.appName == 'Netscape') ? document.body.scrollLeft : document.body.scrollLeft;
      tempX = (navigator.appName == 'Netscape') ? e.clientX : event.clientX;
      tempY = (navigator.appName == 'Netscape') ? e.clientY : event.clientY;
      
    
      
       var left = document.getElementById("dvind" + id).offsetLeft;
       var width=document.getElementById("dvind" + id).offsetWidth;
       var top = document.getElementById("dvind" +id).offsetTop;
      
       		
      document.getElementById("divIndiacate").style.top= (top-5)+'px';
      
  
   document.getElementById(name).style.top=(top-5)+'px';

        document.getElementById("divIndiacate").style.left=(left+760)+'px';
       document.getElementById(name).style.left=(left+785)+'px';

      var bodyHeight=0;
      
    
      
     var bodyTop=document.body.offsetTop;
      var bodyHeight=document.body.offsetHeight;
          var bodywidth=document.body.offsetWidth;
      var bodyBottom=bodyTop+bodyHeight;
      
       var parentTop=document.getElementById(parentDiv).offsetTop;
      var parentHeight=document.getElementById(parentDiv).offsetHeight;
      var parentWidth=document.getElementById(parentDiv).offsetWidth;
      var parentLeft=document.getElementById(parentDiv).offsetLeft;
    //   var parentRight=document.getElementById(parentDiv).offsetRight;
  
      var cleft =  ((bodywidth)*82)/100
//....  document.getElementById("divIndiacate").style.left=(cleft )+'px';
    //    document.getElementById("divIndiacate").style.left=(parentLeft+parentWidth-88)+'px';
     //  document.getElementById(name).style.left=(parentLeft+parentWidth-74)+'px';
  //....     document.getElementById(name).style.left=(cleft+20)+'px';
      var parentBottom=parentTop+parentHeight;
      
      
      var mainHeight=document.getElementById(name).offsetHeight;
      var mainTop=(top-5);//document.getElementById(name).offsetTop;
      
       var mainBottom=mainHeight+mainTop;
      // var mainwidth='430';
       
       
       if(document.getElementById("divBottom"))
       {
      // parentBottom=document.getElementById("divBottom").offsetTop
       }
       
       var checktop=mainTop-mainHeight+2;
       
   
       if(mainBottom>(parentBottom+10) )
       {
     
      if(parentHeight>mainHeight && mainBottom>1060)
         document.getElementById(name).style.top= (mainTop-mainHeight+2)+'px';
         else if(mainBottom>1060)
          document.getElementById(name).style.top= (mainTop-mainHeight-50)+'px';
       }
      document.getElementById(name).style.display="";
      document.getElementById("divIndiacate").style.display="";
        
 //    var newTop=document.getElementById(name).offsetTop;
    /*  if(newTop<parentTop)
      
      alert;
       if(document.getElementById('trNo1'))
       document.getElementById(name).style.top=(document.getElementById('trNo1').offsetTop)+'px';	
       else
       document.getElementById(name).style.top=(top + 15)+'px';
      */
      
     
	}
	
	
	function getWindowSize(){
	var x,y;
	if (self.innerHeight){ // all except Explorer
		x = self.innerWidth;
		y = self.innerHeight;
	}else if (document.documentElement && document.documentElement.clientHeight){// Explorer 6 Strict Mode
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}else if (document.body){ // other Explorers
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	return [x,y];
}
	
	
	
	
	
	
	
	function showFloatDivImage(name)
{	
  
	if (!e)
       {
        var e=window.event || arguments.callee.caller.arguments[0];            	 
       }
 
      var	scrolledV=scrollV() ;
   
       var	scrolledH = (navigator.appName == 'Netscape') ? document.body.scrollLeft : document.body.scrollLeft;
      tempX = (navigator.appName == 'Netscape') ? e.clientX : event.clientX;
      tempY = (navigator.appName == 'Netscape') ? e.clientY : event.clientY;
	  document.getElementById(name).style.left=(tempX+scrolledH +50)+'px';		
      document.getElementById(name).style.top=(tempY+scrolledV + 15)+'px';
      document.getElementById(name).style.display="";
	}
	function t1(t1)
	{
	var valt1 = t1.value;
	trimvalue=trim(valt1);
	if(trimvalue.length ==0)
	{
		return false;	
	}
	else
	{
	return true;
	}
	}
	
	
function previewimage(path,imgid,err,errimg)
{
var strpath;
strpath=document.getElementById(path).value;
 var trimvalue=trim(strpath);
 if(trimvalue.length==0)
		{
	    	document.getElementById(err).style.color = 'red';
			document.getElementById(err).style.display = '';
			document.getElementById(errimg).style.display = 'none';
			return false;
		}
		else
		 {
		 var imgtype = new Array();
		 imgtype=strpath.split(".");
		 if(imgtype.length > 1)
		 {
		 var len=imgtype.length;
		 len++;
		 len--;
		  var type=imgtype[len-1].toLowerCase();
          
		 if(type =='bmp' || type =='jpg' ||type =='jpeg' || type =='png' || type =='gif')
		 { 
		  document.getElementById(imgid).style.display = '';
		  document.getElementById(err).style.display = 'none';
		  document.getElementById(errimg).style.display = 'none';		 
		  document.getElementById(imgid).src="file:///" + strpath;
		 
		//  alert(strpath);
		 return true;
		 }
		 else
		 {
		 document.getElementById(errimg).style.color = 'red';
		 document.getElementById(errimg).style.display = '';
		  document.getElementById(err).style.display = 'none';
		 
		  return false;
		 }
		 
		 }
		else
		{
	    	document.getElementById(errimg).style.color = 'red';
		  document.getElementById(errimg).style.display = '';
		   document.getElementById(err).style.display = 'none';
		   return false;
		}
		
		 }

}
//============================= Function to trim value in text box ===================================
 function trim(value) {
   var temp = value;
   var obj = /^(\s*)([\W\w]*)(\b\s*$)/;
   if (obj.test(temp)) { temp = temp.replace(obj, '$2'); }
   var obj = / +/g;
   temp = temp.replace(obj, " ");
   if (temp == " ") { temp = ""; }
   return temp;
}
//================================ Function to validate blank text box =================================
function checkblank(txt,err)
{
 var txtvalue=document.getElementById(txt).value;
 var trimvalue=trim(txtvalue);
 if(trimvalue.length==0)
		{
		    document.getElementById(err).style.color = 'red';
			document.getElementById(err).style.display = '';
			return false;
		}
		else
		 {
		 document.getElementById(err).style.display = 'none';
		 return true;
		 }
}
function validateInteger( strValue,isdecimal) 
{

if(isdecimal==0)
{

  var objRegExp  = /(^-?\d\d*$)/;
    return objRegExp.test(strValue);
    }
    else
    {

  // var objRegExp  =   '[0-9]*' ; 
   //  objRegExp + = '\\.?[0-9]{0,'3'}';
     
  //  var reg0 = new RegExp(objRegExp) ;
    return true;// reg0.test(strValue);
   }
}
function HideAll()
{

}
function toggle(trigger, el,ex,colapse )
{

  var element = document.getElementById(el);
  if(element.style.display=="none")
  {
    element.style.display="";
     trigger.src= '../gfx/minus.gif';
     trigger.alt=colapse;
  }
  else
  {
    element.style.display="none";
    trigger.src=  '../gfx/plus.gif';
     trigger.alt=ex;
  }
}

function toggle1(trigger, el,ex,colapse )
{

  var element = document.getElementById(el);
  if(element.style.display=="none")
  {
    element.style.display="";
     trigger.src= 'gfx/minus.gif';
     trigger.alt=colapse;
  }
  else
  {
    element.style.display="none";
    trigger.src=  'gfx/plus.gif';
     trigger.alt=ex;
  }
}


//--function for clear textbox
function myClick(clt)
{
    
    if(clt.value=="Max" || clt.value=="Min" || clt.value=="All Search")
    {
    
      clt.value='';  
    }
}

//--Code for size fixing of image
function image_resize()
       {
      
       window.name =''
         if(document.getElementById("tblFixImg"))
           {

            var pix=document.getElementById("tblFixImg").getElementsByTagName('img');
  
            for (i=0; i<pix.length; i++) 
             {
              if(pix[i].name!='no')
             {
            if(pix[i].height>80)
            pix[i].height=80;
            if(pix[i].width>80)
            pix[i].width=80;
            }      
            }
            }
         if(document.getElementById("tblFixImg1"))
           {

            var pix=document.getElementById("tblFixImg1").getElementsByTagName('img');
    
            for (i=0; i<pix.length; i++) 
             {
              if(pix[i].name!='no')
             {
            if(pix[i].height>100)
            pix[i].height=100;
            if(pix[i].width>100)
            pix[i].width=100;
            }      
            }
            }   
       }
       
       
      function FlashObjectClick(pageid,id)
      {
     
      document.getElementById("flashimg").src="navigatead.aspx?img=l&navigateurl=lll&advertisement=" + id + "&pageid=" + pageid;
      } 
      
      function showFlashAd()
      {
      if(document.getElementById("dvAdHead"))
         document.getElementById("dvAdHead").style.display='';
      }
      
          
/*var newwindow = '';

function popitup(url) {

	if (!newwindow.closed && newwindow.location) {
	
		newwindow.location.href = url;
	}
	else {
	
		newwindow=window.open(url);
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
	return false;
}
*/

function setmax(ctl,id)
{
if(ctl)
{
document.getElementById(id).value=ctl.value;
}
}

function searchQuery(froma)
{
if(froma)
{}
else
froma=0;
  var shape=document.getElementById("search_ddlShape").value;
  var sFrom=document.getElementById("search_txtSizeFrom").value;
  var sTo=document.getElementById("search_txtSizeTo").value;
  var clarityFrom=document.getElementById("search_ddlClarityFrom").value;
  var clarityTo=document.getElementById("search_ddlClarityTo").value;
   var colorFrom=document.getElementById("search_ddlColorFrom").value;
  var  colorTo=document.getElementById("search_ddlColorTo").value;
  var aTag=document.getElementById("aSearchMarket");
  var query="shpe=" + shape + "&szf=" + sFrom + "&szt=" + sTo  + "&clrtyf=" + clarityFrom  + "&clrtyt=" + clarityTo;
  query = query +  "&clrf="  + colorFrom + "&clrt=" + colorTo;
  var login="0";
  if(document.getElementById("hidLogin"))
  {
  login=document.getElementById("hidLogin").value;
  }

  if(document.getElementById("search_hidSearchType"))
  {
  
 if(query=="shpe=-1&szf=&szt=&clrtyf=0&clrtyt=0&clrf=0&clrt=0" && froma=="1")
  { 
    var name="divMessage"; 
      if (!e)
       {
        var e=window.event || arguments.callee.caller.arguments[0];            	 
       }
      var	scrolledV=scrollV() ;   
      var	scrolledH = (navigator.appName == 'Netscape') ? document.body.scrollLeft : document.body.scrollLeft;
      tempX = (navigator.appName == 'Netscape') ? e.clientX : event.clientX;
      tempY = (navigator.appName == 'Netscape') ? e.clientY : event.clientY;      
      var left=tempX+scrolledH-20;        
      document.getElementById(name).style.left=(left)+'px';
      document.getElementById("spnMessage").innerHTML= "<span style='color:red'>No value selected for search.</span>";
	  document.getElementById(name).style.top=(tempY+scrolledV)+'px';
	  document.getElementById(name).style.display="";

    return false;
    }
  
  if(document.getElementById("search_hidSearchType").value=="0")
    {
    // window.open("diamondAnonymousResults.aspx?" +query ,'samewindow');
    if(login=="1")
    query="basicSearch_Diamond.aspx?" +query;
    else
     query="diamondAnonymousResults.aspx?" +query;
    }
    else
    {
    if(login=="1")
    query="dmdRequestResults.aspx?" +query;
    else
     query="requestAnonymousResults.aspx?" +query;
     }
     
     aTag.setAttribute("href",query);
  }
   

}


function validateSearchBox()
{
var city=document.getElementById("Txt_city").value;
var keyWord=document.getElementById("Txt_Search").value;
var sType=document.getElementById("Txt_Search_Type").value;

city=trim(city);
keyWord=trim(keyWord);

var check=1;
if(city.length>0)
{
document.getElementById("spnCity").style.display='none';
}
else
{
check=0;
document.getElementById("spnCity").style.display='';

}
if(keyWord.length>0)
{
document.getElementById("spnKey").style.display='none';
}
else
{
check=0;
document.getElementById("spnKey").style.display='';
}
if(check=="1")
{
   if(sType=="Company")
    sType="C";
    else
    sType="P";

   var str=keyWord.split('&');
   if(str.length>1)
   {
     keyWord=str[0];
     
     for(var i=1;i<str.length;i++)
     {
         keyWord=keyWord + "RiZ2f6DDjd" + str[i];
     }
     
     
   }

 // keyWord=keyWord.replace("&","RiZ2f6DDjd");

  window.open("http://directory.diamondworld.net/SearchPageService.aspx?Sfg=Main_Search&Srh=" + keyWord + "&Cty=" + city + "&Stp=" + sType + "&Ad1=0&Ad2=0&Ad3=0",'newwindow');
}

   //Response.Redirect("http://directory.diamondworld.net/SearchPageService.aspx?Sfg=" + Sfg + "&Srh=" + Srh + "&Cty=" + Cty + "&Stp=" + Stp + "&Ad1=" + Ad1 + "&Ad2=" + Ad2 + "&Ad3=" + Ad3);

}

 function checkValue(ctl,spn)
 {
 var txt=ctl.value;

txt=trim(txt);



if(txt.length>0)
{
document.getElementById(spn).style.display='none';
}
else
{

document.getElementById(spn).style.display='';

}
 }


 
                    function Insert(valuess)
                    {                    
                        type = valuess;                        
                        if(type == 'Company')
                        {
                            document.getElementById('RdoCompany').checked = true;                             
                            document.getElementById('Txt_Search_Type').value =type;                            
                        }
                        else
                        {                           
                            document.getElementById('RdoProduct').checked = true;
                            document.getElementById('Txt_Search_Type').value =type;
                            
                        }
                    }
        function Radio(Values)
           {   
                          
                           document.getElementById('Txt_Search_Type').value =Values;                         
           }
           
           
 function setPostQuery()
  {
  var shape=document.getElementById("search_lstshape").value;
  var sFrom=document.getElementById("search_txtPostSizeFrom").value;
  var sTo=document.getElementById("search_txtPostSizeTo").value;
  var clarityFrom=document.getElementById("search_ddlPostClarityFrom").value;
  var clarityTo=document.getElementById("search_ddlPostClarityTo").value;
   var colorFrom=document.getElementById("search_ddlPostColorFrom").value;
  var  colorTo=document.getElementById("search_ddlPostColorTo").value;
 var cutFrom=document.getElementById("search_ddlCutFrom").value;
 var cutTo=document.getElementById("search_ddlCutTo").value;
 
  var certificate=document.getElementById("search_ddlCertificate").value;
 var location=document.getElementById("search_ddlCountry").value;
 var company=document.getElementById("search_txtCmpName").value; 
  var state=document.getElementById("search_txtState").value;
 var city=document.getElementById("search_txtCity").value;
 var phone=document.getElementById("search_txtTele").value;   
  var mobile=document.getElementById("search_txtmobile").value;
 var person=document.getElementById("search_txtContact").value;
 var email=document.getElementById("search_txtemail").value; 
 var remark=document.getElementById("search_txtRemark").value;
 
  

   var trimValues="";
   var error="";
   trimValues=trim(email);
   var c=50;
   if(trimValues.length<=0)
   {   
      error = "Please enter email Id.<br/>";  
      c=c+10;     
   }
   trimValues=trim(person);
   if(trimValues.length<=0)
   {   
      error = error + "Please enter contact person.<br/>";    c=c+10;         
   }
   trimValues=trim(city);
   if(trimValues.length<=0)
   {   
      error = error + "Please enter city.<br/>";        c=c+10;      
   }
   trimValues=trim(phone);
   if(trimValues.length<=0)
   {   
      error = error + "Please enter Telephone number .<br/>";         c=c+10;     
   }
   
    trimValues=trim(sFrom);
   if(trimValues.length<=0 || trimValues=="min" || trimValues =="Min")
   {   
      error = error + "Please enter minimum size value.<br/>";       c=c+10;       
   }
   else
   {
//       var flag=validateInteger(trimValue,0);
//        if(flag==true)
//        {
//        }
//        else
//        {
//        error = error + "Enter numeric value for minimum size value.<br/>";
//        }
   }
   
    trimValues=trim(email);
   if(trimValues.length<=0)
   {   
     // error = error + "Please enter minimum size value.<br/>";       c=c+10;       
   }
   else
   { 
       var flag = validateEmail(trimValues);
      
        if(flag==true)
        {
        }
        else
        {
        error = error + "Please enter valid emailid.<br/>";
        }
   }
   
   

   if(error!="")
   {
   var name="divMessage";
	
 
 
 if (!e)
       {
        var e=window.event || arguments.callee.caller.arguments[0];            	 
       }
       
       //alert(e.altKey);
//if(e.enterKey)
//{
   //  document.getElementById(name).style.left=( document.getElementById('aPostSearch').offsetLeft)+'px';
//}
//else
{

      var	scrolledV=scrollV() ;
   
       var	scrolledH = (navigator.appName == 'Netscape') ? document.body.scrollLeft : document.body.scrollLeft;
      tempX = (navigator.appName == 'Netscape') ? e.clientX : event.clientX;
      tempY = (navigator.appName == 'Netscape') ? e.clientY : event.clientY;
      
        var left=tempX+scrolledH-20;
         if(left<250)
           left=250;
      document.getElementById(name).style.left=(left)+'px';
 }
      document.getElementById("spnMessage").innerHTML= "<span style='color:red'>"  + error + "</span>";
	
		
		//	document.getElementById(name).style.top=(tempY+scrolledV - c)+'px';
		document.getElementById(name).style.top=(500)+'px';
      document.getElementById(name).style.display="";
   
   return;
      
   }



  var strArray=new Array();
  
    strArray=person.split('&');  
  if(strArray.length>1)
  {
    for(var i=0 ;i<strArray.length;i++)
    {
        person = person.replace("&","&nbsp;");
    }
  }
 
  strArray=mobile.split('&'); 
  if(strArray.length>1)
  {
    for(var i=0 ;i<strArray.length;i++)
    {
        mobile = mobile.replace("&","&nbsp;");
    }
  }
 
  
  strArray=remark.split('&');  
  if(strArray.length>1)
  {
    for(var i=0 ;i<strArray.length;i++)
    {
        remark = remark.replace("&","&nbsp;");
    }
  }
 
  strArray=email.split('&'); 
  if(strArray.length>1)
  {
    for(var i=0 ;i<strArray.length;i++)
    {
        email = email.replace("&","&nbsp;");
    }
  }
 
  strArray=state.split('&');
  if(strArray.length>1)
  {
    for(var i=0 ;i<strArray.length;i++)
    {
        state = state.replace("&","&nbsp;");
    }
  }
 
  strArray=city.split('&'); 
  if(strArray.length>1)
  {
    for(var i=0 ;i<strArray.length;i++)
    {
        city = city.replace("&","&nbsp;");
    }
  }
  
  strArray=phone.split('&'); 
  if(strArray.length>1)
  {
    for(var i=0 ;i<strArray.length;i++)
    {
        phone = phone.replace("&","&nbsp;");
    }
  }
  
  strArray=company.split('&'); 
  if(strArray.length>1)
  {
    for(var i=0 ;i<strArray.length;i++)
    {
        company = company.replace("&","&nbsp;");
    }
  }
 
  var aTag=document.getElementById("aSearchMarket");
 
  
  var query="shpe=" + shape + "&szf=" + sFrom + "&szt=" + sTo  + "&clrtyf=" + clarityFrom  + "&clrtyt=" + clarityTo;
  query = query +  "&clrf="  + colorFrom + "&clrt=" + colorTo +  "&cutf="  + cutFrom + "&cutt=" + cutTo;  
  query = query +  "&cert="  + certificate + "&locate=" + location +  "&comp="  + company + "&state=" + state;
  query = query +  "&city="  + city + "&phone=" + phone +  "&mob="  + mobile + "&prson=" + person;  
  query = query +  "&email="  + email + "&remark=" + remark;// +  "&mob="  + mobile + "&prson=" + person;
  
   window.open("addNonMembersPos.aspx?" + query ,'newwindow','width=600px,height=340px,location=0,scrollbars=0,status=0,resizable=0,toolbar=0;');
      
  
  
}


function clearPostQuery()
{
document.getElementById("search_lstshape").selectedIndex=0;
 document.getElementById("search_txtPostSizeFrom").value="Min";
 document.getElementById("search_txtPostSizeTo").value="Max";
document.getElementById("search_ddlPostClarityFrom").selectedIndex=0;
  document.getElementById("search_ddlPostClarityTo").value="0";
 document.getElementById("search_ddlPostColorFrom").selectedIndex=0;
document.getElementById("search_ddlPostColorTo").value="0";
document.getElementById("search_ddlCutFrom").selectedIndex=0;
document.getElementById("search_ddlCutTo").value="0";
document.getElementById("search_ddlCertificate").value="0";
document.getElementById("search_ddlCountry").selectedIndex=0;

document.getElementById("search_txtCmpName").value=""; 
document.getElementById("search_txtState").value=""; 
document.getElementById("search_txtCity").value=""; 
 document.getElementById("search_txtTele").value="";  
 document.getElementById("search_txtmobile").value=""; 
 document.getElementById("search_txtContact").value=""; 
document.getElementById("search_txtemail").value=""; 
document.getElementById("search_txtRemark").value=""; 
}

function checkOnFocus(ctl)
{ 

  var trimValue=ctl.value;
  trimValue=trim(trimValue);
  
  if(trimValue.length>0)
  {
       var flag=validateInteger(trimValue,0);
        if(flag==true)
        {
        }
        else
        {ctl.value="";}
  }
  
}







function validateEmail(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at);
		var lstr=str.length;
		var ldot=str.indexOf(dot);
		
		if (str.indexOf(at)==-1){
		  
		   return false;
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		  
		   return false;
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		  
		    return false;
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		   
		    return false;
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){		 
		    return false;
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		   
		    return false;
		 }
		
		 if (str.indexOf(" ")!=-1){		    
		    return false;
		 }

 		 return true;					
	}

function ValidateForm(){
	var emailID=document.frmSample.txtEmail
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	return true
 }
var type;   
         function chk(id,id1,id2)
{

//setMouseOver(id,id1,id2);
//var id=a;
if(id=='spnL1')
{
document.getElementById('spnL1').className="contenttype-deselected";
document.getElementById('spnL2').className="contenttype-selected";
document.getElementById('spnL3').className="contenttype-selected";
document.getElementById('spnQuickText').innerHTML="Diamond ";
document.getElementById('trQuickSearch').style.display='';
document.getElementById('divDiamond').style.borderLeft='solid 1px #dbe1e6';
document.getElementById('divDiamond').style.borderRight='solid 1px #dbe1e6';
document.getElementById('divDiamond').style.borderBottom='solid 1px #dbe1e6';
document.getElementById("search_hidSearchType").value="0";
document.getElementById('divPost').style.display='none';
document.getElementById('trDText').style.display='';
document.getElementById('divDiamond').style.display='';
document.getElementById('spnSectionText').innerHTML="‘Quick Diamond Search’ allows retailers and professional jewellers to check the availability of diamonds from the Industry’s trusted and reliable sellers from all over the world. Find what you need and satisfy your customers, quickly and efficiently.";
document.getElementById('search_ddlShape').focus();

}
else if(id=='spnL2')
{
document.getElementById('spnL1').className="contenttype-selected";
document.getElementById('spnL2').className="contenttype-deselected";
document.getElementById('spnL3').className="contenttype-selected";
document.getElementById('spnQuickText').innerHTML="Buy Request";
document.getElementById('trQuickSearch').style.display='';
document.getElementById('divDiamond').style.borderLeft='solid 1px #dbe1e6';
document.getElementById('divDiamond').style.borderRight='solid 1px #dbe1e6';
document.getElementById('divDiamond').style.borderBottom='solid 1px #dbe1e6';
document.getElementById('divPost').style.display='none';
document.getElementById('divDiamond').style.display='';
document.getElementById("search_hidSearchType").value="1";
document.getElementById('spnSectionText').innerHTML="'Quick Buy Request Search’ allows sellers to check the request of goods from the Industry’s retailer and professional buyers from all over the world. Find the buy request suits your goods,  quickly and efficiently.";
document.getElementById('search_ddlShape').focus();
}
else if(id=='spnL3')
{
document.getElementById('spnL1').className="contenttype-selected";
document.getElementById('spnL2').className="contenttype-selected";
document.getElementById('spnL3').className="contenttype-deselected";
document.getElementById('trQuickSearch').style.display='none';
document.getElementById('divPost').style.display='';
document.getElementById('divPost').style.borderLeft='solid 1px #dbe1e6';
document.getElementById('divPost').style.borderRight='solid 1px #dbe1e6';
document.getElementById('divPost').style.borderBottom='solid 1px #dbe1e6';
document.getElementById('divDiamond').style.display='none';
document.getElementById('search_lstshape').focus();
//var atag="<a target='_blank' href='http://server.iad.liveperson.net/hc/s-41394903/cmd/kbresource/front_page!PAGETYPE'>Clicking here</a>"


//document.getElementById('spnSectionText').innerHTML="Post your ‘Diamond Buy Request', and let DiamondWorld.Net search for you and send you list of stones from reliable sellers around the world suiting your requirement.For Urgent Buy Request, chat live with our customer support by " + atag + ".";
}

}    

var l1,l2,l3;

function setMouseOver(id,id1,id2)
{
 l1=id;
 l2=id1;
 l3=id2;
  document.getElementById(id).onmouseover= nover;
    document.getElementById(id).onmouseout= nover;
    
     document.getElementById(id1).onmouseover= function(id1){
                if( document.getElementById(l2))
                  {
       document.getElementById(l2).style.color="#BEEC06";
                  }
            };

    document.getElementById(id1).onmouseout=function(id1){
                if( document.getElementById(l2))
  {
       document.getElementById(l2).style.color="#ffffff";
  }
};
    
     document.getElementById(id2).onmouseover= function(id2){
                if( document.getElementById(l3))
  {
       document.getElementById(l3).style.color="#BEEC06";
  }
  };
    document.getElementById(id2).onmouseout= function(id2){
                if( document.getElementById(l3))
               {
                  document.getElementById(l3).style.color="#ffffff";
            }
         };
}     
function nover(){}

function setButtonFocus(id)
{
var key;
key=event.keyCode;
//--keyCode=13 for enter
if(key==13)
{

//var anchors = document.getElementsByTagName("a");
// for(i=0; i<anchors.length; i++){
//   anchors[i].hideFocus = true;
// }



document.getElementById(id).focus();
}

}



