document.write('<script type="text/JavaScript" src="DQC-IMAGES/tooltip.js"></script>'
  +'<link rel="shortcut icon" href="http://www.dienquang.com/dqlamp.ico" type="image/x-icon" />'
  + '<link rel="icon" href="http://www.dienquang.com/dqlamp.ico" type="image/x-icon"/>'
  + '<link rel="ICON" href="http://www.dienquang.com/dqlamp.ico" type="image/x-icon"/>');


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  
	if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
	}
  if(!(x=d[n])&&d.all) 
		x=d.all[n]; 
	for (i=0;!x&&i<d.forms.length;i++) 
		x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
		x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) 
		x=d.getElementById(n); 
	return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
		if ((obj=MM_findObj(args[i]))!=null) { 
			v=args[i+2];
			if (obj.style) { 
				obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v;
			}
    obj.visibility=v; 
	}
}

var myVariable;
var para1;
var para2;

function setdefault() {
	MM_showHideLayers('topnav_sublink1','','hide','topnav_sublink2','','hide','topnav_sublink3','','hide','topnav_sublink4','','hide','topnav_sublink5','','hide','topnav_sublink6','','hide');
	changelink('topnavlink1','','hide','topnavlink2','','hide','topnavlink3','','hide','topnavlink4','','hide','topnavlink5','','hide','topnavlink6','','hide');
}

function stopdelay(subnav, topnavlink) {
	MM_showHideLayers(subnav,'','show')
	changelink(topnavlink,'','show');
	window.clearTimeout(myVariable);
}

function delay(subnav, topnavlink) {
	para1 = subnav;
	para2 = topnavlink;
	myVariable = window.setInterval("hide()", 2000);
}

function hide() {
	MM_showHideLayers(para1,'','hide');
	changelink(para2,'','hide');
}

function changelink() {
  var i,p,v,obj,args=changelink.arguments;
  for (i=0; i<(args.length-2); i+=3) 
		if ((obj=MM_findObj(args[i]))!=null) { 
			v=args[i+2];
			v=(v=='show')?'topnavihover':(v=='hide')?'':v; 
			obj.className=v;
		}
}

function show_div(nshowid,nhideid)
{
 var vsid = document.getElementById(nshowid);
 vsid.style.display = 'inline';
 var vhid = document.getElementById(nhideid);
 vhid.style.display = 'none';
} 


// printer friendly java Script

function printerfriendly() 
{
    var currentURL = window.location;
    var features   = "height=480,width=810,status=no,scrollbars=yes,resizable=no,toolbar=no,menubar=no,location=no";
    window.open("", "showprintcontent", features);
    document.printform.action     = "/servlet/print";
	document.printform.mehtod     = "post";
    document.printform.pull.value = currentURL;
    document.printform.title.value= document.title;
    document.printform.target     = "showprintcontent";
    document.printform.submit();
}

// Search script
function search() 
{
	document.search.action="/servlet/search"
	window.document.search.submit();
}

// Setting Search collection 
function setsearchcol(branch) 
{
	var col= branch.replace(/\//g,"");
	document.write('<input name="col" type="hidden" value="'+col+'" >');
}

// Search script
function populatequerystr(querystr)
{
    document.search.qt.value=querystr;
}

function PopupVideo(theURL) {
	
	var windowprops = "width=500, height=410, location=no, toolbar=no, menubar=no, scrollbars=no, resizable=no";
	popup = window.open(theURL,"WindowName",windowprops);
	popup.focus();
}

function PopupWindow_WName(theURL,nwidth,nheight,nwinname) {
 
 var windowprops = "width="+nwidth+", height="+nheight+", location=no, toolbar=no, menubar=no, scrollbars=no, resizable=no";
 popup = window.open(theURL,nwinname,windowprops);
 popup.focus();
}
// Create Control for flash. Added by zR, 20070528
function CreateControl(DivID, CLSID, ObjectID, WIDTH, HEIGHT, URL, AUTOSTART)
{
	var d = document.getElementById(DivID);
  d.innerHTML = '<object classid=' + CLSID + ' id=' + ObjectID + ' width=' + WIDTH + ' height=' + HEIGHT +'><param name="movie" value=' + URL + '><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent"><embed src=' + URL + ' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width=' + WIDTH + ' height=' + HEIGHT +' wmode="transparent" menu="false"></embed></object>';
}
function CreateControl2(DivID, CLSID, ObjectID, WIDTH, HEIGHT, URL, AUTOSTART)
{
	var d = document.getElementById(DivID);
  d.innerHTML = '<object classid=' + CLSID + ' id=' + ObjectID + ' width=' + WIDTH + ' height=' + HEIGHT +'><param name="movie" value=' + URL + '><param name="quality" value="high"><param name="menu" value="false"><embed src=' + URL + ' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width=' + WIDTH + ' height=' + HEIGHT +' menu="false"></embed></object>';
}


/* Added By Mohan. For Seach and Knova Commented on 9/17/2007
function searchsubmit(e)
{
	alert("searchsubmit Key Code : ");
  var chkEnt = checkEnter(e);
	
	alert(chkEnt);
  if(chkEnt == true)
  {
	search();
  }
}
*/

/*
* Whenever user press enter, this function initiate the search process.
* Added By  : Mohan.S
* Updated on: 17/sep/2007
*/
function searchsubmit(e)
{
	  var whichkey;
	  if (document.layers) //Netscape 4.7
	  {
		whichkey = e.which;
	  }
	  else if (document.getElementById || document.all) //Netscape 6,Netscape 6.2.1 or Internet Explorer
	  {
		whichkey = e.keyCode;
	  }
	  else
	  {
		whichkey=e.keyCode? e.keyCode : e.charCode;
		//whichkey = 0;
	  }

	  if (whichkey == 13) //to check if enter key was pressed
	  {
		search();
		return true;
	  }
	  else
	  {
		return false;
	  }
		
}

/*
* Whenever user press enter, this function initiate the KNOVA process.
* Added By  : Mohan.S
* Updated on: 17/sep/2007
*/


function knovasubmit(prodname,searchtype,e)
{
	  var whichkey;
	  if (document.layers) //Netscape 4.7
	  {
		whichkey = e.which;
	  }
	  else if (document.getElementById || document.all) //Netscape 6,Netscape 6.2.1 or Internet Explorer
	  {
		//whichkey = e.keyCode;
	  }
	  else
	  {
		//whichkey=e.keyCode? e.keyCode : e.charCode;
		//whichkey = 0;
	  }

	  if (whichkey == 13) //to check if enter key was pressed
	  {
		document.inquiry2.target='_blank';
		refineQuerysearchKeyEnter(prodname,searchtype);
		return true;
	  }
	  else
	  {
		return false;
	  }
 
}

/*
* Enter key validation, it returns true, if user presses enter key. 
* Added By  : Mohan.S
* Updated on: 17/Jul/2007
*/
function checkEnter(e)
{
  var whichkey;
  if (document.layers) //Netscape 4.7
  {
	whichkey = e.which;
  }
  else if (document.getElementById || document.all) //Netscape 6,Netscape 6.2.1 or Internet Explorer
  {
	whichkey = e.keyCode;
  }
  else
  {
	 //whichkey=e.keyCode? e.keyCode : e.charCode;
	whichkey = 0;
  }

  if (whichkey == 13) //to check if enter key was pressed
  {
	return true;
  }
  else
  {
	return false;
  }
}

/*** FLASH DETECTION ADDED BY ZR ***/
// Flash Player Version Detection - Rev 1.5
// Detect Client Browser type
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.

// Globals
var requiredMajorVersion = 8; // Major version of Flash required
var requiredMinorVersion = 0; // Minor version of Flash required
var requiredRevision = 0; // Minor version of Flash required

var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;			
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
			var versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
    var str = '';
    if (isIE && isWin && !isOpera)
    {
  		str += '<object ';
  		for (var i in objAttrs)
  			str += i + '="' + objAttrs[i] + '" ';
  		for (var i in params)
  			str += '><param name="' + i + '" value="' + params[i] + '" /> ';
  		str += '></object>';
    } else {
  		str += '<embed ';
  		for (var i in embedAttrs)
  			str += i + '="' + embedAttrs[i] + '" ';
  		str += '> </embed>';
    }

    document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

function randRange(minNum, maxNum) {
	var randomNum = Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum;    
	return randomNum;
}

// This methode enables the visibility of Section, if user chooses perticular section
function isselectedsection(section)
{

	if(classificationtitle == section)
	{
		document.write('<dl>');
	}else
	{
		document.write('<dl class="hide">');
	}

}



// This methode enables the visibility of Primary navigation, if user chooses perticular  Primary navigation

function isselectedprimnav(section,primtitle,url,display)
{
	// checks for existence of selected secondary navigation, if not, highlight the primary navigation with read color
	if(classificationtitle == section && primtitle== primarynavtitle && (secondnavtitle =='None' || secondnavtitle==''))
	{

		document.write('<dt class="selected"><a href=\''+url+'\' class="red1">'+display+'</a></dt>');

	}else if(classificationtitle == section && primtitle== primarynavtitle)
	{
		document.write('<dt class="selected"><a href=\''+url+'\' >'+display+'</a></dt>');
	}else{
		document.write('<dt ><a href=\''+url+'\'>'+display+'</a></dt>');
	}
}

function isselectedsecondnav(section,primtitle,scondtitle,url,display)
{
	// checks for existence of selected secondary navigation, if not, highlight the primary navigation with read color


	if(classificationtitle==section && primarynavtitle ==primtitle && secondnavtitle == scondtitle  )
	{
		if(tertiarydisplay =='None' || tertiarydisplay=='')
		{
			document.write('<dd ><a href=\''+url+'\' class="red1" >'+display+'</a>');
		}else
		{
			document.write('<dd ><a href=\''+url+'\' >'+display+'</a>');
		}
	}else if(classificationtitle==section && primarynavtitle ==primtitle)
	{
		document.write('<dd><a href=\''+url+'\'>'+display+'</a>');
		
	}else{
		document.write('<dd class="hide"><a href=\''+url+'\'>'+display+'</a>');
	}
}

function isselectedtertinav(section,primtitle,secttile)
{
	if(classificationtitle==section && primarynavtitle ==primtitle &&  secondnavtitle == secttile)
	{
		
		document.write('<ul >');
	}else{
		document.write('<ul  class="hide" >');
	}

}

function showprimdisplay(primdisp)
{
	if(primarydisplay == primdisp )
	{
		document.write('<span class="red1" >'+primarydisplay+'</span>');
	}else
	{
		document.write(primdisp);
	}
	
}
function showsecondisplay(seconddisp)
{
	if(secondarydisplay == seconddisp )
	{
		document.write('<span class="red1" >'+secondarydisplay+'</span>');
	}else
	{
		document.write(seconddisp);
	}
	
}

function showtertiarydisplay(tertiarydisp)
{
	if(tertiarydisplay == tertiarydisp )
	{
		document.write('<span class="red1" >'+tertiarydisplay +'</span>');
	}else
	{
		document.write(tertiarydisp);
	}
	
}

//added 27-09-07, for dynamic show hide feature on Solutions lv 4
function mavCloseDiv(divID)
{
		try{document.getElementById(divID).style.display="none";}
		catch(e){}
}

function mavOpenDiv(divID)
{
		try{document.getElementById(divID).style.display="";}
		catch(e){}
}

//Open or closes Child Options
function mavOpenCloseDiv(divName,offClass,onClass)
{		    
	 var divObj = document.getElementById(divName);
	 var aName = 'a_'+divName;
	 var objA = document.getElementById(aName);
	 try {
		 if (divObj.getAttribute('isOpen')== 'true')
		 {
				mavCloseDiv(divName);			
				divObj.setAttribute('isOpen','false');			
				objA.className = offClass;
		 }
		 else
		 {
				mavOpenDiv(divName);
				divObj.setAttribute('isOpen','true');
				objA.className = onClass;
		 }	
	 }
	 catch(e){}
}
//Change Class
function mavSetClass(cName,objID)
{
		try{document.getElementById(objID).className=cName;}
		catch(e){}
}
// Added for Business template more info text. added by Mohand Sep/05/2007
function businessrhsmoreinfo(moreinfo,region_lang)
{
	if(moreinfo == '')
	{
		document.write('For more information on Polycom Enterprise Solutions. Please contact us at <a href=mailto:enterprise_solutions@polycom.com" target="_blank">enterprise.solutions<br/>@polycom.com</a>');
	}else
	{
		document.write(moreinfo);
	}
	
}

/**

Author: Mohan.S
CreatedOn : Sep/11/2007

This is for Solution landing page selectio box. You can use this for other purpose also


	This method accepts 
	formname - Name of the Form, 
	formobject - Select box name , 
	section - Section navigation Dispaly string, 
	primary - Primary navigation Dispaly string. if you want to show multiple primary navigation sublevels, 	
	third level navigation (If empty, then selection box won't show any third level navigation)
	defaultstr - It is defualt value for select box.

*/

function shownavigation(formname,objectname,section,primary,thirdlevel,defaultstr)
{
	var docarr2 = new Array();
	var position=0;
	var thirdnav=false;
	var doccategory= eval("document."+formname+"."+objectname);
	doccategory.options.length=0;
	if(thirdlevel == 'Large Enterprise,Small Medium Business')
	 {
		 if( position == 0)
				{
					docarr2[position]=defaultstr+'%#';
					position++;
				}
				docarr2[1]='Large Conference Room%/usa/en/products/video/large_conference_room/large_conference_room.html';
				docarr2[2]='Small/Medium Conference Room%/usa/en/products/video/small_medium_conference_room/small_medium_conference_room.html';// add secondary level, if u try to show more than one secondary
				

	 }else{

			if(thirdlevel != '')
			{
				thirdnav=true;
			}

			
			

			var primparam=primary.split(",");

			var thirdlevparam=thirdlevel.split(",");

			for(var sec=0 ; sec < naviItems.length; sec ++) // section 
			{
				splitstring = naviItems[sec].split("%");
				if(splitstring[0] == section )
				{
					var primval = naviItems[naviItems[sec]];

					for(var prim=0 ; prim < primval.length; prim ++)  // primary 
					{
						primnavarr = primval[prim].split("%");
						for (primparamcnt=0;primparamcnt < primparam.length ;primparamcnt++ ) // for multiple primary level
						{
						
							if(primnavarr[0] == primparam[primparamcnt])
							{
								var secs = naviItems[naviItems[sec]][primval[prim]];

								
								for(var second=0 ; second < secs.length; second ++) // secondary
								{
									var secondNavStr=secs[second];
									secondnavarr = secondNavStr.split("%");
									

									for (thirdlevcnt=0; thirdlevcnt < thirdlevparam.length ; thirdlevcnt ++ ) // for multiple secondary level
									{

										var strAdd="";
										if( thirdlevparam.length >1)
										{
											strAdd =thirdlevparam[thirdlevcnt]+" - ";
										}
									   
										 if( secondnavarr[0] == thirdlevparam[thirdlevcnt])
										 {
											thirdnav=true;
											thirdnavstr=  naviItems[naviItems[sec]][primval[prim]][secondNavStr];
											if(thirdnavstr != "None")
											 {
												//alert(thirdnavstr);
												for(var third=0 ; third < thirdnavstr.length; third ++) // Third
												{
													if(thirdnavstr[third] != "None")  // don't include sublevels with None in Thrid Level
													{
														if( position == 0)
														{
															docarr2[position]=defaultstr+"%#";
															position++;
														}
														docarr2[position]=strAdd+thirdnavstr[third]; // add secondary level, if u try to show more than one secondary
														position++;
													}
												}
											 }
											
										 }
									 }

									if(!thirdnav)
									{
										if(secondNavStr != "None") // don't include sublevels with None in Secodary level
										{
											if( position == 0)
											{
												docarr2[position]=defaultstr+"%#";
												position++;
											}
											docarr2[position]=secondNavStr;							
											position++;
										}
									}
								}
								

								
							}
						}
					}
				}
			}
	 }// end of else
	// alert(docarr2.length);
	for( valArrCnt=0; valArrCnt< docarr2.length; valArrCnt++)
		{
		//alert(valArrCnt+ ": "+docarr2[valArrCnt]);
			strSplit = docarr2[valArrCnt].split("%");
			if(valArrCnt==0)
			{
				doccategory.options[valArrCnt] = new Option(strSplit[0],strSplit[1],'true','true');
			}else{
				doccategory.options[valArrCnt] = new Option(strSplit[0],strSplit[1],'flase','false');
			}
		}
		doccategory.selectedIndex=0;


}

/**
* form Submit Form
*/

function navsubmitform(formname,obj,defaultstr)
{
	selcategvalue=obj.value;
	if(selcategvalue=='#')
		{
			alert("Please select "+defaultstr);
			return;
		}else
		{
			var formobj=eval("document."+formname);
			formobj.action=selcategvalue;
			formobj.method="post";
			formobj.submit();
		}
	
}

/*******************************************************************
* Added by Sapna Gopinathan                                        *
* Date: 17th April 2008											   *
* Comments: This function is used by flash files to initiate the   *
*           HBX Tagging function.
*******************************************************************/
function PopupWindow(theURL, w, h, name, tagline, domain) {
   _hbPageView(tagline, domain);
	var windowprops = "width="+w+", height="+h+", location=no, toolbar=no, menubar=no, scrollbars=no, resizable=no";
	popup = window.open(theURL,name,windowprops);
//	popup.focus();
}

/********************************************************************************************
* Start: Function used to find a css class within a stylesheet and amend an element's value *
* within the css class                                                                      *
* Used in the product details page right navigation to change the height of the div         *
* containing the flash navigation when a section is expanded or contracted.                 *
* Added by Sapna Gopinathan 												                *
* Date: 16th April 2008																		*
********************************************************************************************/
var rhsFlashDivHeight = "";

function changecss(theClass, element, value) {
    var cssRules;
	var vvalue = value;
	if(theClass == "#rightnav #rhs_flash_navi" && element == "height")
	{
		vvalue = (parseFloat(vvalue.substring(0, vvalue.indexOf('px'))) + 20) + 'px';
	}
    if (document.all) {
        cssRules = 'rules';
    } else if (document.getElementById) {
        cssRules = 'cssRules';
    }
	
    for (var S = 0; S < document.styleSheets.length; S++) {
		if(document.styleSheets[S].href.search(/dqcdienquang.css/) != -1)
		{
			for (var R = 0; R < eval("document.styleSheets["+S+"]."+cssRules+".length"); R++) {
				if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
					document.styleSheets[S][cssRules][R].style[element] = vvalue;
				}
        	}
		}
    }
}

function initialiseRHSFlashDiv()
{
	changecss('#rightnav #rhs_flash_navi', 'height', rhsFlashDivHeight);
}
/********************************************************************************************
* End: Function used to find a css class within a stylesheet and amend an element's value   *
* within the css class                                                                      *
********************************************************************************************/

/********************************************************************************************
* Start: Function used by flash to call the HBX tagging function and the DHTML function to  *
* activate the popup showing the video                                                      *
* Used in the product details page and production subsection page flash when video link is  *
* clicked from flash                                                                        *
* Added by Sapna Gopinathan 												                *
* Date: 22nd April 2008																		*
********************************************************************************************/
function flash_popup(swfName, title, width, height, tagline, domain) {
  _hbPageView(tagline, domain);
  myLightWindow.activateWindow({href: swfName, title: title, params: 'lightwindow_width='+width+',lightwindow_height='+height});
}
/********************************************************************************************
* End: Function used by flash to call the HBX tagging function and the DHTML function to    *
* activate the popup showing the video                                                      *
********************************************************************************************/

/********************************************************************************************
* Start: Function to retrieve a querystring value                                           *
* Added by Sapna Gopinathan 												                *
* Date: 28th April 2008																		*
********************************************************************************************/
function GetQueryStringVal(param)
{
	var q = document.location.search || document.location.hash;
	if(q)
	{
		var startIndex = q.indexOf(param +"=");
		var endIndex = (q.indexOf("&", startIndex) > -1) ? q.indexOf("&", startIndex) : q.length;
		if (q.length > 1 && startIndex > -1) 
		{
			return q.substring(q.indexOf("=", startIndex)+1, endIndex);
		}
	}
	return "";
}
/********************************************************************************************
* End: Function to retrieve a querystring value                                             *
********************************************************************************************/

/********************************************************************************************
* Start: Function for header change country - KKOH                                          *
********************************************************************************************/
function toggle_visibility(id) {
	 var e = document.getElementById(id);
	 if(e != null)
	 {
	 	if(e.style.display == 'block')
			e.style.display = 'none';
		 else
			e.style.display = 'block';
	 }
}
/********************************************************************************************
* End: Function for header change country - KKOH                                            *
********************************************************************************************/

/********************************************************************************************
* Start: Function to initialise div height for product matrix                               *
* Added by Sapna Gopinathan 												                *
* Date: 07th May 2008																		*
********************************************************************************************/
function initialiseRHSProductMatrixDiv()
{
	changecss('#contentframe #level2_matrix #matrix_flash', 'height', '780px');
}

function OpenWindow(theURL, winname) {
	popup = window.open(theURL,winname);
	popup.focus();
}

/********************************************************************************************
* End: Function to initialise div height for product matrix                                 *
********************************************************************************************/


/********************************************************************************************
* Start: Function to download zip file from flash                                           *
* Added by Sapna Gopinathan 												                *
* Date: 09th May 2008																		*
********************************************************************************************/
 function downloadzip(filename, ftagline, fdomain)
{
	if(typeof window._hbPageView == 'function')
	{
		_hbPageView(ftagline, fdomain);
	}
	//alert("opener window --> " + window.opener.location.href);
	//alert("this window --> " + window.location.href);
	
	parent.location.href = filename;
}
/********************************************************************************************
* End: Function to download zip file from flash                                             *
********************************************************************************************/

/***********************************************
* Start										   *
* Ajax Includes script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//To include a page, invoke ajaxinclude("afile.htm") in the BODY of page
//Included file MUST be from the same domain as the page displaying it.
//If the contents of the included file need to be written to a javascript object, the object should be passed as a second argument to the ajaxinclude function.
var rootdomain="http://"+window.location.hostname

function ajaxinclude() {
var varguments = ajaxinclude.arguments;
var url = varguments[0];
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
} 
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.open('GET', url, false) //get page synchronously 
page_request.send(null)
if(varguments.length == 2) 
{
	writecontent(page_request,eval(varguments[1]))
}
else
{
	writecontent(page_request)
}
}

function writecontent()
{
	var varguments = writecontent.arguments;
	var page_request = eval(varguments[0]);
	
	if (window.location.href.indexOf("http")==-1 || page_request.status==200)
	{
		if(varguments.length == 2) //2nd argument should be a object
		{
			var jsObj = eval(varguments[1]);
			//write the contents of the included page to a javascript object
			jsObj.content = page_request.responseText; 
		}
		else
		{
			//write the contents of the included page to the current page
			document.write(page_request.responseText);
		}
		
	}
}

/***********************************************
* End 										   *
* Ajax Includes script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/