function openWindow(catid, itemid, pid, catname, lang, sitename, domainName) {

            var curlink = window.document.location.toString();
                window.open( sitename + "/"+ domainName +  '/Referlink/' + catid + "/" + itemid + "/" + pid + "/" + catname + "/" + lang + "/", 'popupTIPS', 'width=500,height=750,scrollbars=no');
            
        }
        
         function addToFavorite(favTitle)
              { 
                  var title=favTitle; 
                  var url=location.href; 

                  if(window.sidebar){ 
                                      window.sidebar.addPanel(title, url,""); 
                                     }
                  else if( window.opera && window.print )
                                    { 
                                        var mbm = document.createElement('a'); 
                                        mbm.setAttribute('rel','sidebar'); 
                                        mbm.setAttribute('href',url); 
                                        mbm.setAttribute('title',title); 
                                        mbm.click(); 
                                    }
                                    else if(document.all){ 
                                        window.external.AddFavorite( url, unescape(favTitle)); 
                                } 
                  } 
                  

       function clickclear(thisfield, defaulttext) {
            if (thisfield.value == defaulttext) {
                thisfield.value = "";
            }
        }

        function clickrecall(thisfield, defaulttext) {
            if (thisfield.value == "") {
                thisfield.value = defaulttext;
            }
        }

      function searchresult(sitename,domainName){
      //alert(document.frmSearch);
document.frmSearch.action=sitename+'/'+domainName+'/search/1/1/'
document.frmSearch.submit()
return false}

   function searchmouseover()
          {
            document.getElementById("sok").src="media/imgsok_mo.png";
          }
          
           function searchmouseout()
          {
            document.getElementById("sok").src="media/imgsearch.png";
          }  
          
function disableBtn(btnID, newText) {

    var btn = document.getElementById(btnID);
    setTimeout("setImage('" + btnID + "')", 10);
    btn.disabled = true;
    btn.value = newText;
}

function setImage(btnID) {
    var btn = document.getElementById(btnID);
    btn.style.background = 'url(12501270608.gif)';
}	

function setmouseover(id)
{
  document.getElementById(id).style.backgroundColor="#E0E0E0";
 }  

function setmouseout(id)
{
 document.getElementById(id).style.backgroundColor="#FFFFFF";
}  

function Menuover(lid,bulletid,txtid)
        {
         document.getElementById(lid).style.backgroundImage="url(media/bglevel1sel.jpg)";
         document.getElementById(lid).style.backgroundRepeat ="no-repeat";
         document.getElementById(lid).style.backgroundPosition="bottom";
         document.getElementById(lid).style.backgroundColor="#F15B54";
         document.getElementById(bulletid).src="media/level1bullet_sel.png";
         document.getElementById(txtid).style.color="#ffffff";
       }
        
         function Menuout(lid,bulletid,txtid)
        {
         document.getElementById(lid).style.backgroundImage="none";
         document.getElementById(bulletid).src="media/level1bullet.png";
          document.getElementById(lid).style.backgroundColor="Transparent";
         document.getElementById(txtid).style.color="#3F3F3F";
        }
       
        //Gallary //
      
      
         var currentImgCount=0;
        var nextImgCount=1;
        var prevImgCount=-1;
        var prevnum=0;
        var i=0;
        var timeDelay;
         var IsSlideShow = 0;
         var htmlresult;
       
	     
    function FetchMediumImage(img_name,imgextn,imgcount,imgdescr,obj,txtid) // onclick Thumb rotator img
    {
        //  window.location.hash="#deta";    
        // alert("medium");
        var  p_para=img_name +  imgextn;
        
        //GetMediumImage.GetImage_Medium(p_para,imgcount,imagepath,imgdescr,OnWSRequestComplete, OnWSRequestFailed);
        nextImgCount = imgcount + 1;
        currentImgCount =  imgcount;
        prevImgCount =imgcount-1;
        IsSlideShow=0;
	    i=currentImgCount;
	    var tid="txt_"+currentImgCount;
        //alert(document.getElementById(tid));

        document.getElementById("txt_"+prevnum).style.textDecoration="none";

	    document.getElementById("txt_"+currentImgCount).style.textDecoration="underline";
	   
	    prevnum=currentImgCount
	       var str_GalleryImg="";
	       
	         var prevGal="";
	         
	        	         
	          for(var i=0;i<=imgcount-1;i++)
	           {
                prevGal+=" "+limage[i];
               
                }
	          
	            //alert(limage.length);
	          
	           for(var i=imgcount+1;i<limage.length;i++)
	           {
                str_GalleryImg+=" "+limage[i];
                
                //alert(str_GalleryImg[i]);
                }
                
                var currentHtml=imgstr[currentImgCount].replace(',','');
               
               htmlresult=prevGal+imgstr[currentImgCount]+str_GalleryImg;
	          
	 	       var hashValue = "#deta"; 
	      window.location.hash = hashValue;
	  // alert(htmlresult);
	           if (document.getElementById("Image_Container_2") !=null)
                {
                  document.getElementById("Image_Container_2").innerHTML=htmlresult;
                  fadeTargetId='photo1' + currentImgCount;
                            
//                       if (hashValue == window.location.hash)
//                 {
//                    window.location.hash = new String((new Date().getMilliseconds()));
//                 }


                f1(currentImgCount);
                     //fadeInit();
                }
                
//        document.getElementById("imgtop").style.width = parseInt(width[currentImgCount])+"px";
//         document.getElementById("imgtopmid").style.width = parseInt(width[currentImgCount])-22+"px";
//          document.getElementById("imgbotmid").style.width = parseInt(width[currentImgCount])-22+"px";
//        document.getElementById("imgbot").style.width = parseInt(width[currentImgCount])+"px";

            if (document.getElementById("ctl00_ctl10_Image_Ingress1") != null)
	      {
	          document.getElementById("ctl00_ctl10_Image_Ingress1").innerHTML = decodeURI(imageIngress[currentImgCount]);
	   //       alert(imageIngress[currentImgCount]);
	         
	      }
	      else
	      {
	        
	        if (imageIngress[currentImgCount] != "") {
	             document.getElementById("ctl00_middleSection_ctl00_Image_Ingress1").innerHTML = decodeURI(imageIngress[currentImgCount]);
                 document.getElementById("Image_Ingress").style.display = "";
	          }
	          else {

	              document.getElementById("Image_Ingress").style.display = "none";
	          }

	      }
	      
	       if (document.getElementById("ctl00_middleSection_ctl00_imgTitle") !=null)
	      {
	        document.getElementById("ctl00_middleSection_ctl00_imgTitle").innerHTML=imagetitle[currentImgCount];
	      }
	      
	       jQuery(document).ready(function ($) {
     $('#Image_Container_2 a img').load(function () {
     //alert($('#Image_Container_2 a img').width());
            $('#Image_Container_2').width($('#Image_Container_2 a img').width());
            $('#Image_Container_2').height($('#Image_Container_2 a img').height());
//        $('.btmIngree2').width($('#Image_Container_2 a img').width() - 32);
//        $('.btmIngree2').css({ top: ($('#Image_Container_2 a img').height() - ($('#ingressDiv div').height() + 32)) });
//        $('#ingressDiv').css('visibility', 'visible');
    });
    });
	      
	   } 
   
    
    function GetNextImage()     //Function To Show Next Image
    {
        if (nextImgCount < imagepath.length )
        {     
                        
           //GetMediumImage.GetImage_Next(currentImgCount,imagepath,imageIngress,OnWSRequestComplete, OnWSRequestFailed);
                        
           nextImgCount +=1;
           currentImgCount +=1;
           prevImgCount +=1;
          
           IsSlideShow=0;
           i=currentImgCount;
           
            var str_GalleryImg="";
	       
	         var prevGal="";
	         
           for(var i=0;i<=currentImgCount-1;i++)
	           {
                prevGal+=" " +limage[i];
                //alert(prevGal[i]);
                }
	          
	            //alert(limage.length);
	          
	           for(var i=currentImgCount+1;i<limage.length;i++)
	           {
                str_GalleryImg+=" "+limage[i];
                
                //alert(str_GalleryImg[i]);
                }
            //alert(width[nextImgCount]);
               htmlresult=prevGal+imgstr[currentImgCount]+str_GalleryImg
	        var hashValue = "#deta"; 
	      window.location.hash = hashValue;
	    
	    //alert(htmlresult);
	           if (document.getElementById("Image_Container_2") !=null)
                {
                   //alert(currentImgCount);
                 document.getElementById("Image_Container_2").innerHTML=htmlresult;
                 fadeTargetId='photo1' + currentImgCount;
                 
//                       if (hashValue == window.location.hash)
//                 {
//                    window.location.hash = new String((new Date().getMilliseconds()));
//                 }
                  //

                  var temp = currentImgCount;
                  //alert($('photo1' + currentImgCount));
                  //$('photo1' + currentImgCount).show("slow");
                  f1(currentImgCount);
           
                     //fadeInit();
                }

           
           
           
//          if (document.getElementById("ctl00_ctl10_Image_Ingress") !=null)
//	      {
//	        document.getElementById("ctl00_ctl10_Image_Ingress").innerHTML=imageIngress[currentImgCount];
//	      }
//	      else
//	      {
//	        document.getElementById("ctl00_ctl10_Image_Ingress").innerHTML=imageIngress[currentImgCount];
              //	      }
              
//           var temp = new String(imageIngress[currentImgCount]);  
// alert(temp);  
// temp = temp.replace(/[^a-zA-Z 0-9]+/g,'<br>');  
// alert(temp);    
//              
           //  alert(imageIngress[currentImgCount]);
              if (document.getElementById("ctl00_ctl10_Image_Ingress1") != null) {
                  document.getElementById("ctl00_ctl10_Image_Ingress1").innerHTML = decodeURI(imageIngress[currentImgCount]);
                 
                 }
                 else {

                     if (imageIngress[currentImgCount] != "") {
                       
                         document.getElementById("ctl00_middleSection_ctl00_Image_Ingress1").innerHTML = decodeURI(imageIngress[currentImgCount]);
                         document.getElementById("Image_Ingress").style.display = "";
                        
                     }
                     else {

                         document.getElementById("Image_Ingress").style.display = "none";
                     }
                 }



                 if (document.getElementById("ctl00_middleSection_ctl00_imgTitle") != null) {
                     document.getElementById("ctl00_middleSection_ctl00_imgTitle").innerHTML = imagetitle[currentImgCount];
                 }
                    
       }
       
         jQuery(document).ready(function ($) {
                 $('#Image_Container_2 a img').load(function () {
                 //alert($('#Image_Container_2 a img').width());
                        $('#Image_Container_2').width($('#Image_Container_2 a img').width());
                        $('#Image_Container_2').height($('#Image_Container_2 a img').height());
//                    $('.btmIngree2').width($('#Image_Container_2 a img').width() - 32);
//                    $('.btmIngree2').css({ top: ($('#Image_Container_2 a img').height() - ($('#ingressDiv div').height() + 32)) });
//                    $('#ingressDiv').css('visibility', 'visible');
                });
                });

    }
        
    function GetPrevImage()    //Function To Show Previous Image
    {
        if (prevImgCount != -1 )
       {
          //GetMediumImage.GetImage_Previous(currentImgCount,imagepath,imageIngress,OnWSRequestComplete, OnWSRequestFailed);
            
           nextImgCount -=1;      
           prevImgCount -=1;
           currentImgCount -=1; 
           IsSlideShow=0;
	       i=currentImgCount;
	       
	          var str_GalleryImg ="";
	       
	         var prevGal = "";
	         
	         	         
	      for(var i=0;i<=currentImgCount-1;i++)
	           {
                prevGal+=" "+limage[i];
                //alert(prevGal[i]);
                }
	          
	            //alert(limage.length);
	          
	           for(var i=currentImgCount+1;i<limage.length;i++)
	           {
                str_GalleryImg+=" "+limage[i];
                
                //alert(str_GalleryImg[i]);
                }
               
               htmlresult=prevGal+imgstr[currentImgCount]+str_GalleryImg
	     var hashValue = "#deta"; 
	     window.location.hash = hashValue;

	    //alert(htmlresult);
	           if (document.getElementById("Image_Container_2") !=null)
                {
                
                  
                   
                   //alert(currentImgCount);
                   
                document.getElementById("Image_Container_2").innerHTML=htmlresult;
       
                  fadeTargetId='photo1' + currentImgCount;
                            
//                       if (hashValue == window.location.hash)
//                 {
//                    window.location.hash = new String((new Date().getMilliseconds()));
//                 }

                  f1(currentImgCount);
                     //fadeInit();
                }

	       
	       
//	        if (document.getElementById("ctl00_ctl10_Image_Ingress") !=null)
//	      {
//	        document.getElementById("ctl00_ctl10_Image_Ingress").innerHTML=imageIngress[currentImgCount];
//	      }
//	      else
//	      {
//	        document.getElementById("ctl00_ctl10_Image_Ingress").innerHTML=imageIngress[currentImgCount];
                 //	      }
                 if (document.getElementById("ctl00_ctl10_Image_Ingress1") != null) {
                     document.getElementById("ctl00_ctl10_Image_Ingress1").innerHTML = decodeURI(imageIngress[currentImgCount]);
                 }
                 else {
                     
                     if (imageIngress[currentImgCount] != "") {

                         document.getElementById("ctl00_middleSection_ctl00_Image_Ingress1").innerHTML = decodeURI(imageIngress[currentImgCount]);
                         document.getElementById("Image_Ingress").style.display = "";

                     }
                     else {

                         document.getElementById("Image_Ingress").style.display = "none";
                     }

                 }

                 if (document.getElementById("ctl00_middleSection_ctl00_imgTitle") != null) {
                     document.getElementById("ctl00_middleSection_ctl00_imgTitle").innerHTML = imagetitle[currentImgCount];
                 }
        }
        
          jQuery(document).ready(function ($) {
                 $('#Image_Container_2 a img').load(function () {
                 //alert($('#Image_Container_2 a img').width());
                        $('#Image_Container_2').width($('#Image_Container_2 a img').width());
                        $('#Image_Container_2').height($('#Image_Container_2 a img').height());
//                    $('.btmIngree2').width($('#Image_Container_2 a img').width() - 32);
//                    $('.btmIngree2').css({ top: ($('#Image_Container_2 a img').height() - ($('#ingressDiv div').height() + 32)) });
//                    $('#ingressDiv').css('visibility', 'visible');
                });
                });

    }
    
   function SlideShow(para)      //Function To Show Slideshow
    { 
       if (para == undefined) 
       {
          IsSlideShow = (IsSlideShow == 0) ? 1 : 0;
       }

       if (IsSlideShow == 1)
       {
       
         var str_GalleryImg ="";
	       
	         var prevGal = "";
	         
              for(var j=0;j<=currentImgCount;j++)
	           {
                prevGal+=" "+limage[j];
                //alert(prevGal[i]);
                }
	          
	            //alert(limage.length);
	          
          for(var k=currentImgCount+2;k<limage.length;k++)
	           {
                str_GalleryImg+=" "+limage[k];
                
                //alert(str_GalleryImg[i]);
                }
                
            
            if (i <= imagepath.length-1)
             {
                //GetMediumImage.GetImage_slideshow(i,imagepath,imageIngress, OnWSRequestComplete,OnWSRequestFailed);  
                
     
                currentImgCount=i ;
                prevImgCount = i-1;
                nextImgCount = i+1;
                i++;
                
                //prevGal1[i]=limage[i];
                
                //str_GalleryImg1[i]=limage[i];
//alert(i);
                
                htmlresult=prevGal+imgstr[currentImgCount]+str_GalleryImg
               
	      var hashValue = "#deta"; 
	     window.location.hash = hashValue;
	   //alert(htmlresult);
	           if (document.getElementById("Image_Container_2") !=null)
                {
                  document.getElementById("Image_Container_2").innerHTML=htmlresult;
       
                  fadeTargetId='photo1' + currentImgCount;
                            
//                       if (hashValue == window.location.hash)
//                 {
//                    window.location.hash = new String((new Date().getMilliseconds()));
//                 }


                  f1(currentImgCount);
                     //fadeInit();
                }
                
                timeDelay=setTimeout("SlideShow(0)",4000);
                
//          if (document.getElementById("ctl00_ctl10_Image_Ingress") !=null)
//	      {
//	        document.getElementById("ctl00_ctl10_Image_Ingress").innerHTML=imageIngress[currentImgCount];
//	      }
//	      else
//	      {
//	        document.getElementById("ctl00_ctl10_Image_Ingress").innerHTML=imageIngress[currentImgCount];
                //	      }
                if (document.getElementById("ctl00_ctl10_Image_Ingress1") != null) {
                    document.getElementById("ctl00_ctl10_Image_Ingress1").innerHTML = decodeURI(imageIngress[currentImgCount]);
                }
                else {
                   
                    if (imageIngress[currentImgCount] != "") {

                        document.getElementById("ctl00_middleSection_ctl00_Image_Ingress1").innerHTML = decodeURI(imageIngress[currentImgCount]);
                        document.getElementById("Image_Ingress").style.display = "";

                    }
                    else {

                        document.getElementById("Image_Ingress").style.display = "none";
                    }
                }

                if (document.getElementById("ctl00_middleSection_ctl00_imgTitle") != null) {
                    document.getElementById("ctl00_middleSection_ctl00_imgTitle").innerHTML = imagetitle[currentImgCount];
                }

             }
         
             if (i==imagepath.length)
             { 
               i=0;       
               clearTimeout(timeDelay);
             }
         }
         else
         {
             IsSlideShow=0;
             clearTimeout(timeDelay);
         }
         
           jQuery(document).ready(function ($) {
                 $('#Image_Container_2 a img').load(function () {
                 //alert($('#Image_Container_2 a img').width());
                        $('#Image_Container_2').width($('#Image_Container_2 a img').width());
                        $('#Image_Container_2').height($('#Image_Container_2 a img').height());
//                    $('.btmIngree2').width($('#Image_Container_2 a img').width() - 32);
//                    $('.btmIngree2').css({ top: ($('#Image_Container_2 a img').height() - ($('#ingressDiv div').height() + 32)) });
//                    $('#ingressDiv').css('visibility', 'visible');
                });
                });

      }      
       
