﻿ 
	 function Guidedpopup()
         {
            var w = 480, h = 340;

	        if (document.all) {
	            /* the following is only available after onLoad */
	            w = document.body.clientWidth;
	            h = document.body.clientHeight;
	        }
	        else if (document.layers) {
	            w = window.innerWidth;
	            h = window.innerHeight;
	        }

	        var popW = 525, popH = 480;

	        var leftPos = (w - popW) / 2, topPos = (350) / 2;
            //googlewin = dhtmlwindow.open("dynamicsExchange", "iframe", "ceadvisor/TestDefault.aspx?CEID=cf2bd11c-572f-4448-894f-f2abfd4e8ef7", "Build Your CRM Solution", "width=757px,height=580px,resize=0,scrolling=0,center=0","recal");
            googlewin = dhtmlwindow.open("dynamicsExchange", "iframe", "../SCDefault.aspx", "Build Your CRM Solution", "width=750px,height=580px,resize=0,scrolling=0,center=0","recal");
            googlewin.moveTo(370, 190);
         }
   
	
	    function clearDefault(el) 
	    {
	        if (el.defaultValue==el.value) el.value = ""
	    }
	
    
    function FP_preloadImgs() 
	    {//v1.0
            var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
            for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
        }

        function FP_swapImg() 
        {//v1.0
             var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
             n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
             elm.$src=elm.src; elm.src=args[n+1]; } }
        }

        function FP_getObjectByID(id,o) 
        {//v1.0
             var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
             else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
             if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
             for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
             f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
             for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
             return null;
        }

        function FP_swapImgRestore() 
        {//v1.0
            var doc=document,i; if(doc.$imgSwaps) { for(i=0;i<doc.$imgSwaps.length;i++) {
            var elm=doc.$imgSwaps[i]; if(elm) { elm.src=elm.$src; elm.$src=null; } } 
            doc.$imgSwaps=null; 
         }
         }
   

        normal_image = new Image();
        normal_image.src = "images/video1.jpg";

        mouseover_image = new Image();
        mouseover_image.src = "images/video1_over.jpg";

        
        function swap(){
        if (document.images){
        for (var x=0;
        x<swap.arguments.length;
        x+=2) {
        document[swap.arguments[x]].src = eval(swap.arguments[x+1] + ".src");
        }
        }
        }
    




function ShowFlash()
{
//alert("Flash");
var varpos;
      var divobj =  document.getElementById('chat');
    var count = divobj.getElementsByTagName('img')
    //alert(count);
    if(count.length > 0)
    {
        str = new String(count[0].src)
      //alert(str);
        varpos = str.indexOf('DynamicsCenter_Chat_Available.gif',0)
        //alert(varpos);
       if(varpos>0 )
       {
          // alert("in");
          document.getElementById("chat").style.display = "none";
       }
       else
       {
         //alert("out");
         document.getElementById("flash").style.display = "none";
         document.getElementById("chat").style.display = "block";
       }
    }
}

