<!--



function resizeGPNIframe(width, height)
{
   try
   {
        if(document.domain.indexOf('.') != document.domain.lastIndexOf('.'))
        {
              document.domain = document.domain.substring(document.domain.indexOf('.')+1);
             
                
        }
        //alert(width + "," + height+","+document.domain);
        try
        {
            window.parent.resizeIframeXY('ctl00_Content_ifBrowserProfiler', width, height);
        }
        catch(err)
        {
            
            try
            {
                window.parent.resizeIframeXY('ctl00_Content_ifFunctionalQA',width,height);
            }
            catch (err2)
            {  
            }
        }
    }
    catch(err)
    {
       // alert("error"+ err);
    }
}

function clear_textbox(textbox)
{
//	if (document.text_form.tb_new_proj_name.value == "Enter Project Name")
//	document.text_form.tb_new_proj_name.value = "";
	if(textbox.value == "Enter Project Name" || textbox.value == "Enter Suite Description (optional)" ||
	    textbox.value == "Enter Suite Name" ||
	    textbox.value == "Enter Test Name" ||
	    textbox.value == "Enter Test Description (optional)")
	{
	    textbox.value="";
	}
}	
	
function load_image()
{
}

function PreviewWindow(url,name,width,height,fullscreen)
{
	iWidth = width + 40;
	iHeight = height + 40;
	sScrolls = "yes";
	sResizable = "yes";

	var fstring = "";
	if (fullscreen == 1)
		fstring = "width=" + screen.availWidth + ",height=" + screen.availHeight + ",toolbar=yes,location=0,resizable=" + sResizable + ",scrollbars=" + sScrolls + ",left=0,screenX=0,top=0,screenY=0"
	else
		fstring = "width=" + iWidth + ",height=" + iHeight + ",toolbar=yes,resizable=" + sResizable + ",location=0,scrollbars=" + sScrolls + ",left=1,screenX=1,top=1,screenY=1"

	var hWnd = window.open(url,"_blank",fstring);

	if (hWnd.focus != null) hWnd.focus();

	return;
}

function EnumWindowPosition()
{
	this.ScreenCenter = "ScreenCenter";
	this.WindowCenter = "WindowCenter";
	this.Absolute = "ScreenCenter";
}

var WindowPosition = new EnumWindowPosition();

function OpenWindow(url, name, position, x, y, width, height)
{
	if (position == WindowPosition.ScreenCenter)
	{
		x = window.screen.width/2 - width/2;
		y = window.screen.height/2 - height/2;
	}
	else if (position == WindowPosition.WindowCenter)
	{
		x = (window.screenLeft + window.document.body.clientWidth/2) - width/2;
		y = (window.screenTop + window.document.body.clientHeight/2) - height/2;
	}
	
	sScrolls = "yes";
	sResizable = "yes";
	sToolbars = "yes";

	var fstring = "width=" + width + ",height=" + height + ",location=1,status=1,toolbar=" + sToolbars + ",resizable=" + sResizable + ",scrollbars=" + sScrolls + ",left=" + x + ",screenX=" + x + ",top=" + y + ",screenY=" + y;

	if (name == "")
	{
		name = "_blank";
	}
	
	var hWnd = window.open(url, name, fstring, true);

	if (hWnd != null && hWnd.focus != null)
	{
		hWnd.focus();
	}

	return hWnd;
}

// Count Down functions for vnc applet
function countdown_clock(minute)
         {
         html_code = '<div id="countdown" class="page"></div>';
         document.write(html_code);

         Todays_Date = (new Date()).getTime();              
         Target_Date = (new Date(Todays_Date.valueOf() + (minute * 60000))).getTime();                  

         countdown(Target_Date);                
         }
         
function countdown(Target_Date)
         {
			//Convert both today's date and the target date into miliseconds.                           
			Todays_Date = (new Date()).getTime();        

			//Find their difference, and convert that into seconds.                  
			Time_Left = Math.round((Target_Date - Todays_Date) / 1000);

			if(Time_Left < 0)
			Time_Left = 0;

			hours = Math.floor(Time_Left / (60 * 60));
			Time_Left %= (60 * 60);
			minutes = Math.floor(Time_Left / 60);
			Time_Left %= 60;
			seconds = Time_Left;

			if(seconds <10) seconds = '0' + seconds;

			time = 'Time Remaining ' + hours + ':' + minutes + ':' + seconds;

			if(minutes<3) document.all.countdown.innerHTML = '<FONT COLOR=RED>*** ' + time + ' *** </FONT>'
			else document.all.countdown.innerHTML = time
			    
			//Recursive call, keeps the clock ticking.
			setTimeout('countdown(' + Target_Date +  ');', 1000);
         }
         
function clickButton(e, buttonid)
{
	var bt = document.getElementById(buttonid);
	if( typeof bt == 'object')
	{
		if(navigator.appName.indexOf("Netscape")>(-1))
		{
			if (e.keyCode == 13)
			{
				bt.click();
				return false;
			}
		}
		if(navigator.appName.indexOf("Microsoft Internet Explorer")>(-1))
		{
			if (event.keyCode == 13)
			{
				bt.click();
				return false;
			}
		}
	}
}

 var xhttp;

 function onSuccessFlagChange(e, eventinfo){
 
	  var mySelect = eventinfo.getMenuItem().getValue();
	  var temp = new Array();
	  temp = mySelect.split(':');
	  
	  var newMenuItem = eventinfo.getMenuItem();
	  var oldMenuItem=eventinfo.getMenu().getTopGroup().getItemByIndex(0);
        //instantiate XmlHttpRequest

          // Checking if IE-specific document.all collection exists 
          // to see if we are running in IE 
          if (document.all) { 
            xhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
           } else { 
          // Mozilla - based browser 
            xhttp = new XMLHttpRequest(); 
          }
          //hook the event handler
          xhttp.onreadystatechange = HandlerOnReadyStateChange;
          //prepare the call, http method=GET, true=asynchronous call
//      GET /wsdl/Tools.asmx/UpdateCaptureSuccess?pb_id=string&success_val=string HTTP/1.1
          xhttp.open("GET", 
            "/wsdl/Tools.asmx/UpdateCaptureSuccess?pb_id=" + temp[0] +
             "&success_val="+ temp[1], true);
          //finally send the call
          
          if (document.all)
          {
             xhttp.send();        
          }  
          else
          {
			xhttp.send(null);
          }
            var newMenuItem = eventinfo.getMenuItem();
     	    var oldMenuItem=eventinfo.getMenu().getTopGroup().getItemByIndex(0);
     	    
     	    var tempMenuItemLeftIcon = newMenuItem.getLeftIcon();
     	    var tempMenuItemValue = newMenuItem.getValue();
     	    var tempMenuItemText = newMenuItem.getText();
     	    
     	    newMenuItem.setLeftIcon(oldMenuItem.getLeftIcon());
     	    newMenuItem.setValue(oldMenuItem.getValue());
     	    newMenuItem.setText(oldMenuItem.getText());
     	    
     	    oldMenuItem.setLeftIcon(tempMenuItemLeftIcon);
     	    oldMenuItem.setValue(tempMenuItemValue);
     	    oldMenuItem.setText(tempMenuItemText);
     	    
     	   
     	    
     }
      
      
function HandlerOnReadyStateChange(){
     
        
        // This handler is called 4 times for each 
        // state change of xmlhttp
        // States are: 0 uninitialized
        //      1 loading
        //      2 loaded
        //      3 interactive
        //      4 complete
        if (xhttp.readyState==4){
			
       
        }
      }
      
 function PCCAM_Display_oDG()
 {
	setTimeout('aspxlab_Callback("cb_oDG", " ")', 10000);
 }


function hello_world()
 {
	var elem = document.createElement("img");
	elem.src = "http://agent.gomez.com/macvpn/start.png?"+Math.random();
	document.body.appendChild(elem);
 }
-->