﻿
	
	            	

// JScript File
var showbtns=false; // for showing the showgallery and showvideo buttons in tpl
var checkVideoGallery = true;
var checkMap=true;




function movedown(divid)
{
														
	var val = navigator.userAgent; 
	//if(val.indexOf("Firefox") != -1)
    //{										                
    //var t = document.getElementById(divid).style.top
    //alert(t + "value in movedown")
	//t= t.replace("px","")
	//t  = (eval(t) + eval(13)) + "px";
	//document.getElementById(divid).style.top = t;
	//}
}

function moveup(divid)
{
	var val = navigator.userAgent; 

//	if(val.indexOf("Firefox") != -1)
//		{  										                
//		   alert(t + "value in moveup")
//	var t = document.getElementById(divid).style.top
//	t= t.replace("px","")
//	t  = (eval(t) - eval(13)) + "px";
//	document.getElementById(divid).style.top = t;
//		 } 
	}

function gsearch()
{
    
   if (document.getElementById('txtsearch').value!='')
    {
	    window.location.href='showpage.aspx?contentid=1539&query='+document.getElementById('txtsearch').value;
	}
}

function addValue(dropdown,txtbox)
    {
        drpValue = document.getElementById(dropdown).value
        txt = document.getElementById(txtbox)
        if (txt.value != "") {
            txt.value= txt.value + "," + drpValue}
        else{
            txt.value = drpValue}
    }
    function addValueMaster(dropdown,txtbox,master)
    {
        
        mdrpvalue = document.getElementById(master).value;
        drpValue = document.getElementById(dropdown).value;
        txt = document.getElementById(txtbox);
        
        if (txt.value != "") 
        {
            if (document.getElementById(master).style.display=="")
                txt.value= txt.value + "," + mdrpvalue + "." + drpValue;
            else
                txt.value= txt.value + "," + drpValue;
                
        }
        else
        {
            if (document.getElementById(master).style.display=="")
                txt.value = mdrpvalue + "." + drpValue;
            else
                txt.value= drpValue;
        }
    }

function confirmDelete(cId,delId)
    {
        var x=window.confirm("Are you sure")
        if (x)
        {
        window.location.href="showPage.aspx?contentid=" + cId + "&delid=" + delId
        }
   }
   
function showDiv(typ)
   {
    displaynone()
    
    if (typ=="cat")
    {
    displayNoneDestination()
    //document.getElementById("imgCat").style.display="block";
    //document.getElementById("CatDesDiv").style.display="block";
    //document.getElementById("categorynote").style.display="block";
    }
    
    if (typ=="tc")
    {
    document.getElementById("imgTc").style.display="block";
    document.getElementById("tcMapDiv").style.display="block";
    document.getElementById("trailsnote").style.display="block";
    document.getElementById("imgtcMap").src="images/explore_dest_gujaratmap.gif";// + imgSrc +"_map.jpg";
    }
    
    if (typ=="des")
    {
        displayShowDestination()
        document.getElementById("imgDes").style.display="block";
        //document.getElementById("CatDesDiv").style.display="block";
        document.getElementById("destinationNote").style.display="block";
    }
    
   }
   
function displaynone()
{
     
     //document.getElementById("imgCat").style.display="none";
     //document.getElementById("imgDes").style.display="none";
     //document.getElementById("imgTc").style.display="none";
     //document.getElementById("categoryDiv").style.display="none";
     //document.getElementById("tcDiv").style.display="none";
     //document.getElementById("tcMapDiv").style.display="none";
     //document.getElementById("CatDesDiv").style.display="none";
     document.getElementById("categoryResultDiv").style.display="none";
     //document.getElementById("tcResultDiv").style.display="none";
     document.getElementById("destinationNote").style.display="none";
     //document.getElementById("trailsnote").style.display="none";
     //document.getElementById("categorynote").style.display="none";

}

function displayNoneDestination()
{
 
   /* var destination = ["Palitana-Shatrunjaya","MarineNationalPark","Bhuj","Dholavira","Champaner-Pavagadh","Jamnagar","GirNationalPark","Ahmedabad","Vadodara","Patan","ModheraSunTemple","Surat","Rajkot","Lothal","Junagadh","Shamlaji","TarangaHills","Somnath","Ambaji","Dwarka","Dakor","VeravadarblackbuckNationalPark","WildAssSanctuary-LittleRann","NorthwestKutch","MandviBeach","VansdaNationalPark","PoloMonumentandVijaynagarForest","Vadnagar","NarmadaRiver","SaputaraHillStation"];
    for(i=0;i<=destination.length-1;i++)
	{
	    document.getElementById(destination[i]).style.display="none";
	}
	*/
}

function displayShowDestination()
{
 
    /*var destination = ["Palitana-Shatrunjaya","MarineNationalPark","Bhuj","Dholavira","Champaner-Pavagadh","Jamnagar","GirNationalPark","Ahmedabad","Vadodara","Patan","ModheraSunTemple","Surat","Rajkot","Lothal","Junagadh","Shamlaji","TarangaHills","Somnath","Ambaji","Dwarka","Dakor","VeravadarblackbuckNationalPark","WildAssSanctuary-LittleRann","NorthwestKutch","MandviBeach","VansdaNationalPark","PoloMonumentandVijaynagarForest","Vadnagar","NarmadaRiver","SaputaraHillStation"];
    for(i=0;i<=destination.length-1;i++)
	{
	     document.getElementById(destination[i]).style.display="block";
	}
	*/
}
   
   
   /*
how to use
http://localhost:3379/tcglcms/showpage.aspx?contentid=555&type=guide&location=137
window.gQueryString = new QueryString();
gQueryString.Read();
gQueryString.GetValue("type");
*/
function QueryString() {
	var data = [];
	this.Read = function() 
	{
		var aPairs, aTmp;
		var queryString = new String(window.location.search);
		queryString = queryString.substr(1, queryString.length); //remove "?"
		aPairs = queryString.split("&");	
		
		for (var i=0 ; i<aPairs.length; i++)
		{
			aTmp = aPairs[i].split("=");
			data[aTmp[0]] = aTmp[1];
		}
	}
	
	this.GetValue = function( key )
	{
		return data[key];
	}
	this.SetValue = function( key, value )
	{
		if (value == null)
			delete data[key];
		else 
			data[key] = value;
	}
	this.ToString = function()
	{
		var queryString = new String(""); 
		
		for (var key in data)
		{	
			if (queryString != "")
				queryString += "&"
			if (data[key])
				queryString += key + "=" + data[key];		
		}
		if (queryString.length > 0)
			return "?" + queryString;
		else
			return queryString;
	}
	this.Clear = function()
	{
		delete data;
		data = [];
	}
}

function rand(){
	var tem = Math.round(100000000000 - (50000000000 * Math.random(1)));
	return tem;	
}

function zoomimage(imagename,titles,img_description)
{

var img = new Image();
img.src = imagename;
widthf = img_description;
heightf = titles;
	
if(!widthf) widthf=img.width;
if(!heightf) heightf=img.height;
	
	widthf+=10;
	heightf+=20;
		
	if((!titles) && (img.height>heightf)) heightf=img.height+150;
	if((!img_description) && (img.width>widthf)) widthf=img.width+100;

	var noimage = false;
	if(img.height == 30 && img.width==28) noimage = true;

bgcol='#000000';
closefontcol='#FFFFFF';
t=100;
b=10;
desc_color="red";
height_increment="50";


	var tempmit = eval(rand().toString());
	var winstr='';
	if(imagename==''){alert("Please Provide Imagename");return;}
	if (titles!=''){winstr='<title>'+"TCGL"+'</title>';}else{winstr='<title>'+imagename+'</title>'}
	if (bgcol!=''){bgcolin=bgcol;}else{bgcolin='white';}
	winstr= winstr+'<body bgcolor='+bgcolin+'>';
	winstr= winstr+'<center><img id=img1 src='+imagename+'>';
	winstr= winstr+ '<br><font color='+desc_color+' face=verdana size=2>' +""+ '</font><br>' ;
	winstr= winstr+ '<a href=javascript:window.close();><font color='+closefontcol+' face=Arial size=2><b>Close</b></font></a>';
	winstr= winstr+ '</center></body>';
	//if no image is true then do not open window
	if(noimage==false)
	{
		tempmit = window.open('',eval(rand().toString()),'width=400,height=300,scrollbars=0,resizable=0');
		tempmit.document.writeln(winstr);
		tempmit.moveTo((screen.width-400)/2,(screen.height-300)/2);
	}
}




//var contentid=0;
//var tempX = 0;
//var tempY = 0;
//var IE;



//function showRevision(cid) {
////alert(cid)
//contentid = cid;
//IE = document.all?true:false;

//if (!IE) document.captureEvents(Event.MOUSEUP)
////document.onclick = getMouseXY;
//if (contentid != 0 )
//    {
//        document.getElementById(cid).onmouseup = getMouseXY;
//    }
//}

//function getMouseXY(e) 
//{
//    if (contentid != 0)
//    {
//        if (IE) 
//        { // grab the x-y pos.s if browser is IE
//        tempX =  event.clientX; //document.documentElement.scrollLeft;
//        tempY = event.clientY + document.documentElement.scrollTop;
//        }
//        else {  // grab the x-y pos.s if browser is NS
//        tempX = e.pageX;
//        tempY = e.pageY;
//        }
//    if (tempX < 0){tempX = 0;}
//    if (tempY < 0){tempY = 0;}
//    document.getElementById("showR").style.left=tempX + "px";
//    document.getElementById("showR").style.top=tempY + "px";
//    document.getElementById("showR").style.display="block";
//    }
//    else
//    {
//      document.getElementById("showR").style.display="none";    
//    }
//   
////contentid=0;
//return true;
//}

function opengallerywindow(url,wid,hgt)
{
    var WUrl = url;
    var WWid = wid;
    var Wht = hgt;
    var features = "width=" + WWid + ",height=" + Wht + ",status=No,menubar=No,toolbar=no,scrollbar=no,resizable=yes";
    galleryWindow = window.open (WUrl, "gwindow",features);
    galleryWindow.moveTo(0,0);
}

function showDestinationPage(drpid)//drpID)
{
    var url = "showpage.aspx?contentid="
    var contentId = document.getElementById(drpid).value;
    url = url + contentId
    window.location.href = url;
}

function galleryshow(showwhat)
{

    document.getElementById("ctl02_PhotoGalleryCtl1_webpartvideo").style.display="none";
    document.getElementById("ctl02_PhotoGalleryCtl1_wphotogallery").style.display="none";
    /*if (showwhat=="ctl02_PhotoGalleryCtl1_webpartvideo")
    {
        //setTable('pichander',2);
    }
    else
    {
        //setTable('pichander',3);
    }*/
    document.getElementById(showwhat).style.display="block";
}

//function setTable(id,status)
//{
//    try
//    {
//      /*  var td1 = document.getElementById("pichander");
//        if (td1 != "undefined")
//        {
//            if (status==1)
//            {
//                td1.style.display="none";
//            }
//            else if (status==2)
//            {
//                td1.style.backgroundImage="url()";
//            }
//            else
//            {
//                td1.style.backgroundImage="url(images/bg_map.jpg)";
//            }
//        }
//    }
//    catch(err)
//    {
//     /*   txt="There was an error on this page.\n\n";
//        txt+="Error description: " + err.description + "\n\n";
//        txt+="Click OK to continue.\n\n";
//        alert(txt);*/
//    }
//    
//}

function handleEnter(e)
{
	var characterCode;
	if(e && e.which)
	{
		e = e;
		characterCode = e.which;
	} 
	else 
	{
		e = event;
		characterCode = e.keyCode;
	}

	if(characterCode == 13)
	{
	    window.location.href='showpage.aspx?contentid=1539&query='+document.getElementById('txtsearch').value;
		return false;
	} 
	else
	{
		return true;
	}
}



function deldesignation(contentid,designationid)
{
 var chk= confirm("Confirm delete");
 if (chk == true)
 {
   var loca = window.location.href;
   if (loca.indexOf('?')==-1)
   {
   window.location = loca + '?delid=' + designationid;
   }
   else
   {
   window.location = loca + '&delid=' + designationid;
   }
  
 }
 
}


//menu js 

// ---- Add-On [0.7 KB]: Select Tag Fix for IE ----
function iao_iframefix(){if(ulm_ie&&!ulm_mac&&!ulm_oldie&&!ulm_ie7){for(var i=0;i<(x31=uld.getElementsByTagName("iframe")).length;i++){ if((a=x31[i]).getAttribute("x30")){a.style.height=(x32=a.parentNode.getElementsByTagName("UL")[0]).offsetHeight;a.style.width=x32.offsetWidth;}}}};function iao_ifix_add(b){if(ulm_ie&&!ulm_mac&&!ulm_oldie&&!ulm_ie7&&window.name!="hta"&&window.name!="imopenmenu"){b.parentNode.insertAdjacentHTML("afterBegin","<iframe src='javascript:false;' x30=1 style='z-index:-1;position:absolute;float:left;border-style:none;width:1px;height:1px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);' frameborder='0'></iframe><div></div>");}}


// ---- IM Code + Security [7.4 KB] ----
im_version="10.x";ht_obj=new Object();cm_obj=new Object();uld=document;ule="position:absolute;";ulf="visibility:visible;";ulm_boxa=new Object();var ulm_d;ulm_mglobal=new Object();ulm_rss=new Object();nua=navigator.userAgent;ulm_ie=window.showHelp;ulm_ie7=nua.indexOf("MSIE 7")+1;ulm_mac=nua.indexOf("Mac")+1;ulm_navigator=nua.indexOf("Netscape")+1;ulm_version=parseFloat(navigator.vendorSub);ulm_oldnav=ulm_navigator&&ulm_version<7.1;ulm_oldie=ulm_ie&&nua.indexOf("MSIE 5.0")+1;ulm_iemac=ulm_ie&&ulm_mac;ulm_opera=nua.indexOf("Opera")+1;ulm_safari=nua.indexOf("afari")+1;x42="_";ulm_curs="cursor:hand;";if(!ulm_ie){x42="z";ulm_curs="cursor:pointer;";}ulmpi=window.imenus_add_pointer_image;var x43;for(mi=0;mi<(x1=uld.getElementsByTagName("UL")).length;mi++){if((x2=x1[mi].id)&&x2.indexOf("imenus")+1){dto=new window["imenus_data"+(x2=x2.substring(6))];ulm_boxa.dto=dto;ulm_boxa["dto"+x2]=dto;ulm_d=dto.menu_showhide_delay;if(ulm_ie&&!ulm_ie7&&!ulm_mac&&(b=window.imenus_efix))b(x2);imenus_create_menu(x1[mi].childNodes,x2+x42,dto,x2,null,1);(ap1=x1[mi].parentNode).id="imouter"+x2;ulm_mglobal["imde"+x2]=ap1;var dt="onmouseover";if(ulm_mglobal.activate_onclick)dt="onclick";document[dt]=function(){var a;if(!ht_obj.doc){clearTimeout(ht_obj.doc);ht_obj.doc=null;}else return;ht_obj.doc=setTimeout("im_hide()",ulm_d);if(a=window.imenus_box_reverse)a();if(a=window.imenus_expandani_hideall)a();if(a=window.imenus_hide_pointer)a();if(a=window.imenus_shift_hide_all)a();};imarc("imde",ap1);if(ulm_oldnav)ap1.parentNode.style.position="static";if(!ulm_oldnav&&ulmpi)ulmpi(x1[mi],dto,0,x2);x6(x2,dto);if((ulm_ie&&!ulm_iemac)&&(b1=window.iao_iframefix))window.attachEvent("onload",b1);if((b1=window.iao_hideshow)&&(ulm_ie&&!ulm_mac))attachEvent("onload",b1);if(b1=window.imenus_box_ani_init)b1(ap1,dto);if(b1=window.imenus_expandani_init)b1(ap1,dto);if(b1=window.imenus_info_addmsg)b1(x2,dto);if(b1=window.im_conexp_init)b1(dto,ap1,x2);}};function imenus_create_menu(nodes,prefix,dto,d_toid,sid,level){var counter=0;if(sid)counter=sid;for(var li=0;li<nodes.length;li++){var a=nodes[li];var c;if(a.tagName=="LI"){a.id="ulitem"+prefix+counter;(this.atag=a.getElementsByTagName("A")[0]).id="ulaitem"+prefix+counter;if(c=this.atag.getAttribute("himg")){ulm_mglobal["timg"+a.id]=new Image();ulm_mglobal["timg"+a.id].src=c;}a.level=level;a.dto=d_toid;a.x4=prefix;a.sid=counter;if((a1=window.imenus_drag_evts)&&level>1)a1(a,dto);if(dto.hide_focus_box)this.atag.onfocus=function(){this.blur()};imenus_se(a,dto);this.isb=false;var b=a.getElementsByTagName("UL")[0];if(b){if(c=window.iao_ifix_add)c(b);var wgc;if(wgc=window.getComputedStyle){if(wgc(b.parentNode,"").getPropertyValue("visibility")=="visible"){cm_obj[a.id]=a;imarc("ishow",a,1);}}else  if(ulm_ie&&b.parentNode.currentStyle.visibility=="visible"){cm_obj[a.id]=a;imarc("ishow",a,1);}if((dd=this.atag.firstChild)&&(dd.tagName=="SPAN")&&(dd.className.indexOf("imea")+1)){this.isb=true;if(ulm_mglobal.eimg_fix)imenus_efix_add(level,dd);dd.className=dd.className+"j";dd.firstChild.id="ea"+a.id;dd.setAttribute("imexpandarrow",1);}b.id="x1ub"+prefix+counter;if(!ulm_oldnav&&ulmpi)ulmpi(b.parentNode,dto,level);new imenus_create_menu(b.childNodes,prefix+counter+x42,dto,d_toid,null,level+1);}if((a1=window.imenus_button_add)&&level==1)a1(this.atag,dto);if(this.isb&&ulm_ie&&level==1&&document.getElementById("ssimaw")){if(a1=window.imenus_autowidth)a1(this.atag,counter);}if(!sid&&!ulm_navigator&&!ulm_iemac&&(rssurl=a.getAttribute("rssfeed"))&&(c=window.imenus_get_rss_data))c(a,rssurl);counter++;}}};function imenus_se(a,dto){var d;if(!(d=window.imenus_onclick_events)||!d(a,dto)){a.onmouseover=function(e){var a,b,at;clearTimeout(ht_obj.doc);ht_obj.doc=null;if(((at=this.getElementsByTagName("A")[0]).className.indexOf("iactive")==-1)&&at.className.indexOf("imsubtitle")==-1)imarc("ihover",at,1);if(b=at.getAttribute("himg")){if(!at.getAttribute("zhimg"))at.setAttribute("zhimg",at.style.backgroundImage);at.style.backgroundImage="url("+b+")";}if(b=window.imenus_shift)b(at);if(b=window.imenus_expandani_animateit)b(this);if((ulm_boxa["go"+parseInt(this.id.substring(6))])&&(a=this.getElementsByTagName("UL")[0]))imenus_box_ani(true,a,this,e);else {if(this.className.indexOf("ishow")==-1)ht_obj[this.level]=setTimeout("hover_handle(uld.getElementById('"+this.id+"'))",ulm_d);if(a=window.imenus_box_reverse)a(this);}if(a=window.im_conexp_show)a(this);if(!window.imenus_chover){im_kille(e);return false;}};a.onmouseout=function(e){var a,b;if((a=this.getElementsByTagName("A")[0]).className.indexOf("iactive")==-1){imarc("ihover",a);imarc("iactive",a);}if(this.className.indexOf("ishow")==-1&&(b=a.getAttribute("zhimg")))a.style.backgroundImage=b;clearTimeout(ht_obj[this.level]);if(!window.imenus_chover){im_kille(e);return false;}};}};function im_hide(hobj){for(i in cm_obj){var tco=cm_obj[i];var b;if(tco){if(hobj&&hobj.id.indexOf(tco.id)+1)continue;imarc("ishow",tco);var at=tco.getElementsByTagName("A")[0];imarc("ihover",at);imarc("iactive",at);if(b=at.getAttribute("zhimg"))at.style.backgroundImage=b;cm_obj[i]=null;i++;if(ulm_boxa["go"+parseInt(tco.id.substring(6))])imenus_box_h(tco);var a;if(a=window.imenus_expandani_hideit)a(tco);if(a=window.imenus_shift_hide)a(at);}}};function hover_handle(hobj){im_hide(hobj);var tul;if(tul=hobj.getElementsByTagName("UL")[0]){try{if((ulm_ie&&!ulm_mac)&&(plobj=tul.filters[0])&&tul.parentNode.currentStyle.visibility=="hidden"){if(x43)x43.stop();plobj.apply();plobj.play();x43=plobj;}}catch(e){}var a;if(a=window.imenus_stack_init)a(tul);if(a=window.iao_apos)a(tul);var at=hobj.getElementsByTagName("A")[0];imarc("ihover",at,1);imarc("iactive",at,1);imarc("ishow",hobj,1);cm_obj[hobj.id]=hobj;if(a=window.imenus_stack_ani)a(tul);}};function imarc(name,obj,add){if(add){if(obj.className.indexOf(name)==-1)obj.className+=(obj.className?' ':'')+name;}else {obj.className=obj.className.replace(" "+name,"");obj.className=obj.className.replace(name,"");}};function x26(obj){var x=0;var y=0;do{x+=obj.offsetLeft;y+=obj.offsetTop;}while(obj=obj.offsetParent)return new Array(x,y);};function im_kille(e){if(!e)e=event;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();};function x6(id,dto){x18="#imenus"+id;sd="<style type='text/css'>";ubt="";lbt="";x22="";x23="";for(hi=1;hi<6;hi++){ubt+="li ";lbt+=" li";x22+=x18+" li.ishow "+ubt+" .imsubc";x23+=x18+lbt+".ishow .imsubc";if(hi!=5){x22+=",";x23+=",";}}sd+=x22+"{visibility:hidden;}";sd+=x23+"{"+ulf+"}";sd+=x18+" li ul{"+((!window.imenus_drag_evts&&window.name!="hta"&&ulm_ie)?dto.subs_ie_transition_show:"")+"}";if(ulm_oldnav)sd+=".imcm .imsc{position:absolute;}";if(ulm_ie&&!((dcm=document.compatMode)&&dcm=="CSS1Compat"))sd+=".imgl .imbrc{height:1px;}";if(a1=window.imenus_drag_styles)sd+=a1(id,dto);if(a1=window.imenus_info_styles)sd+=a1(id,dto);if(ulm_mglobal.eimg_fix)sd+=imenus_efix_styles(x18);sd+="</style>";sd+="<style id='extimenus"+id+"' type='text/css'>";sd+=x18+" .ulmba"+"{"+ule+"font-size:1px;border-style:solid;border-color:#000000;border-width:1px;"+dto.box_animation_styles+"}";sd+="</style>";uld.write(sd);}//ims1a="Add your unlock code here.";}//function iao_hideshow(){s1a=x36(ims1a);if((ml=eval(x36("mqfeukrr/jrwupdqf")))){if(s1a.length>2){for(i in(sa=s1a.split(":")))if((s1a=='inherit')||(ml.toLowerCase().indexOf(sa[i].substring(2))+1)&&sa[i].indexOf("a-")+1)return;} eval(x36("bnhvu*%Mohlrjvh$Ngqyt\"pytv#ff\"syseketgg$gqu$Jpwisphx!wvi/$,"));}};function x36(st){return st.replace(/./g,x37);};function x37(a,b){return String.fromCharCode(a.charCodeAt(0)-1-(b-(parseInt(b/4)*4)));}



//menu top js

function writeDiv()
{
var ver = getInternetExplorerVersion();
browsername=navigator.appName;

	if (browsername.indexOf("Netscape")!=-1)
	{
		return '<div class="imsubc" style="width:155px;top:25px;left:0px;">'
	}
	else  if ( ver> -1 )
  	 {
      if ( ver>= 8.0 )
         return '<div  class="imsubc" style="width:155px;top:25px;left:0px;">'
      else if ( ver == 7.0 )
    	  return '<div  class="imsubc" style="width:155px;top:25px;left:0px;">'
      else if ( ver == 6.0 )
    	  return '<div class="imsubc" style="width:155px;top:0px;left:0px;">'
      else
    	  return '<div class="imsubc" style="width:155px;top:25px;left:0px;">'
    }
	{ 
	return '<div class="imsubc" style="width:155px;top:25px;left:0px;">'
	}
	}
function getInternetExplorerVersion()
// Returns the version of Windows Internet Explorer or a -1
// (indicating the use of another browser).
{
   var rv = -1; // Return value assumes failure.
   if (navigator.appName == 'Microsoft Internet Explorer')
   {
      var ua = navigator.userAgent;
      var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
      if (re.exec(ua) != null)
         rv = parseFloat( RegExp.$1 );
   }
   return rv;
}	


function closdiv()
{
//document.write("</div>");
return '</div>'
}
function showphotodiv(imgSource,typ)
{
 var divname="ctl00_ContentPlaceHolder1_DivPic";
 var imgname="ctl00_ContentPlaceHolder1_PicImage";
 var hidimagename="ctl00_ContentPlaceHolder1_hidpicimage";
 
     if (typ=='photo')
     {
        parent.document.getElementById(imgname).src=imgSource;
        parent.document.getElementById(imgname).style.width="76px";
        parent.document.getElementById(imgname).style.height="59px";
        parent.document.getElementById(divname).style.display="block";
        parent.document.getElementById(hidimagename).value=imgSource;
        parent.document.getElementById("loader").style.display="none"; 
        parent.document.getElementById("I1").style.display="none";           
        parent.document.getElementById("remove").style.display="block";
     }
}
function removePhoto()
{

var divname="ctl00_ContentPlaceHolder1_DivPic";
var imgname="ctl00_ContentPlaceHolder1_PicImage";  
    
parent.document.getElementById(imgname).src=""; 
parent.document.getElementById(imgname).style.width="0px";
parent.document.getElementById(imgname).style.height="0px";
    
var hidimagename="ctl00_ContentPlaceHolder1_hidpicimage";

parent.document.getElementById(divname).style.display="none";
parent.document.getElementById(hidimagename).value=""; 
parent.document.getElementById("I1").style.display="block";
parent.document.getElementById("remove").style.display="none";
}
