function getHAVmodelPage( category, lang ){
	oSel   = document.getElementById( 'sel_' + category );
	model  = oSel.options[ oSel.selectedIndex ].value;
	params = '?l=' + lang + '&sc=' + category + '&m=' + model;
	
	if ( ( category == 'DVP' ) || ( category == 'SLV' ) || ( category == 'RDRG' ) || ( category == 'RDRV' ) || ( category == 'RDRH' ) ) {
		document.location = '/hav/dvd/dvr/dvr.asp' + params;
	}
	else if ( ( category == 'HTP' ) || ( category == 'CMT' ) || ( category == 'AVD' ) || ( category == 'JUKE' ) ) {
		document.location = '/hav/hac/hta/hta.asp' + params;
	}
	else if ( category == 'VCR' ) {
		document.location = '/hav/dvd/vcr/vcr.asp' + params;}
}



function getTVmodelPage( category, lang ){
	var oSel   = document.getElementById( 'sel_' + category );
	var model  = oSel.options[ oSel.selectedIndex ].value;
	var params = '?l=' + lang + '&sc=' + category + '&m=' + model;
	var	url	   = '';		
	
	switch ( category ) {
		case 'LCD'		: url = '/tv/lcd/lcd.asp';					break;
		case 'PROJ'		: url = '/tv/projectors/projectors.asp'; 	break;
		case 'PLASMA'	: url = '/tv/plasma/plasma.asp';			break;
		case 'CRT'		: url = '/tv/crt/crt.asp';					break;
		case 'PROJTV'	: url = '/tv/projtv/projtv.asp';			break;
	}
	document.location = url + params;}



function showModelPage( site ){

	var theModel = document.getElementById( 'globalModelSearch' ).value;
	
	// Create the REQUEST object and make the call
	if ( window.XMLHttpRequest ) { // Non-IE browsers
		_req = new XMLHttpRequest();
	} 
	else if ( window.ActiveXObject ){ // IE
		_req = new ActiveXObject( "Microsoft.XMLHTTP" );
	}
	
	_req.open( "GET", "/shared/code/supportwebservs.asmx/getModelPage?site=" + site + "&m=" + theModel );
	_req.onreadystatechange = function() {
								if ( _req.readyState == 4 ) {
									// document.location = _req.responseText;
									try {
										document.location = _req.responseXML.getElementsByTagName( 'string' )[0].childNodes[0].nodeValue; }
									catch ( e ) {
										document.location = _req.responseText;
									}
									_req = null;
								}
							  }
	_req.send( null );}


function getODWCountryName( theCountry, theLanguage ){

	switch ( theCountry ){
		case "UA" : ctyName = "Україна"; 			break;
		case "AT" : ctyName = "Österreich"; 	 	break;
		case "BG" : ctyName = "Bulgaria"; 	 	 	break;
		case "HR" : ctyName = "Hrvatska"; 		 	break;
		case "CZ" : ctyName = "Česká republika"; 	break;
		case "DK" : ctyName = "Denmark"; 		 	break;
		case "LV" : ctyName = "Latvia"; 		 	break;
		case "FI" : ctyName = "Suomi"; 				break;
		case "FR" : ctyName = "France"; 			break;
		case "DE" : ctyName = "Deutschland"; 		break;
		case "GR" : ctyName = "Greece"; 			break;
		case "HU" : ctyName = "Magyarország"; 		break;
		case "IE" : ctyName = "Ireland"; 			break;
		case "IT" : ctyName = "Italia"; 			break;
		case "MK" : ctyName = "Македонија"; 		break;
		case "RO" : ctyName = "România"; 			break;
		case "NL" : ctyName = "Nederland"; 			break;
		case "NO" : ctyName = "Norge"; 				break;
		case "PL" : ctyName = "Polska"; 			break;
		case "PT" : ctyName = "Portugal"; 			break;
		case "RU" : ctyName = "Россия"; 			break;
		case "YU" : ctyName = "Srbija i Crna gora";	break;
		case "SK" : ctyName = "Slovensko"; 			break;
		case "SI" : ctyName = "Slovenija"; 			break;
		case "ES" : ctyName = "España"; 			break;
		case "SE" : ctyName = "Sverige"; 			break;
		case "TR" : ctyName = "Türkiye"; 			break;
		case "GB" : ctyName = "United Kingdom"; 	break;
		case "BE" :
			switch ( theLanguage )
			{	case "fr" : ctyName = "Belgique"; 	break;
				case "nl" : ctyName = "België"; 	break;
			}
			break;
		case "CH" :
			switch ( theLanguage )
			{	case "de" : ctyName = "Schweiz"; 	break;
				case "fr" : ctyName = "Suisse"; 	break;
			}
			break;
	   default : ctyName = "Sony Europe";
	} 
	return ctyName;}


function getODWurlRef( theCountry, theLanguage ){

	switch ( theCountry )
	{
		case "UA" : odw_url = "http://www.sony.ua"; 	break;
		case "AT" : odw_url = "http://www.sony.at"; 	break;
		case "BG" : odw_url = "http://www.sony.bg"; 	break;
		case "HR" : odw_url = "http://www.sony.hr"; 	break;
		case "CZ" : odw_url = "http://www.sony.cz"; 	break;
		case "DK" : odw_url = "http://www.sony.dk"; 	break;
		case "LV" : odw_url = "http://www.sony.lv"; 	break;
		case "FI" : odw_url = "http://www.sony.fi"; 	break;
		case "FR" : odw_url = "http://www.sony.fr"; 	break;
		case "DE" : odw_url = "http://www.sony.de"; 	break;
		case "GR" : odw_url = "http://www.sony.gr"; 	break;
		case "HU" : odw_url = "http://www.sony.hu"; 	break;
		case "IE" : odw_url = "http://www.sony.ie"; 	break;
		case "IT" : odw_url = "http://www.sony.it"; 	break;
		case "MK" : odw_url = "http://www.sony.com.mk"; break;
		case "RO" : odw_url = "http://www.sony.ro"; 	break;
		case "NL" : odw_url = "http://www.sony.nl"; 	break;
		case "NO" : odw_url = "http://www.sony.no"; 	break;
		case "PL" : odw_url = "http://www.sony.pl"; 	break;
		case "PT" : odw_url = "http://www.sony.pt"; 	break;
		case "RU" : odw_url = "http://www.sony.ru"; 	break;
		case "YU" : odw_url = "http://www.sony.co.yu"; 	break;
		case "SK" : odw_url = "http://www.sony.sk"; 	break;
		case "SI" : odw_url = "http://www.sony.si"; 	break;
		case "ES" : odw_url = "http://www.sony.es"; 	break;
		case "SE" : odw_url = "http://www.sony.se"; 	break;
		case "TR" : odw_url = "http://www.sony.tr"; 	break;
		case "GB" : odw_url = "http://www.sony.co.uk"; 	break;
		case "BE" :
			switch ( theLanguage )
			{	case "fr" : odw_url = "http://www.sony.be/view/View.action?site=odw_fr_BE"; break;
				case "nl" : odw_url = "http://www.sony.be/view/View.action?site=odw_nl_BE"; break;
			}
			break;
		case "CH" :
			switch ( theLanguage )
			{	case "de" : odw_url = "http://www.sony.ch/view/View.action?site=odw_de_CH"; break;
				case "fr" : odw_url = "http://www.sony.ch/view/View.action?site=odw_fr_CH"; break;
			}
			break;
	   default : odw_url = "http://www.sony-europe.com";
	} 
	// return odw_url;
	document.location = odw_url;}
		
		
function createCookie(name,value,days){
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";}


function readCookie(name){
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;}


function eraseCookie(name){
	createCookie(name,"",-1);}


function getBrowserId(){

	var userAgent = navigator.userAgent.toLowerCase();

	if ( userAgent.indexOf( "msie" ) != -1 ) {
		return "explorer";
	} else 	{
		if ( userAgent.indexOf( "netscape" ) != -1 ) {
			return "netscape";
		} else 		{
			if ( userAgent.indexOf( "firefox" ) != -1 ) {
				return "firefox";
			}
		}
	}
}

function dnld(loc){
	window.open(loc,'mywindow','width=430,height=350')
	return false;}



function showHideiFrame( objiFrame ){

	theiFrame = parent.document.getElementById( objiFrame );
	
	if ( theiFrame.style.display == "block" ) {
		theiFrame.style.display = "none"
	} else {
		centerIFrame( objiFrame );
		theiFrame.style.display = "block"
	}

}


function centerIFrame( objiFrame ){

	theIFrame = document.getElementById( objiFrame );
	
	// -- Calculate the object dimensions --
	var w = theIFrame.style.width;
	if ( w.indexOf( 'px' ) != 0 ) w = w.substring( 0, w.indexOf( 'px' ) );
	var h = theIFrame.style.height;
	if ( h.indexOf( 'px' ) != 0 ) h = h.substring( 0, h.indexOf( 'px' ) );

	// -- Calculate the inner width and height
	var innerX, innerY;
	if (self.innerHeight) // all except Explorer
	{
		innerX = self.innerWidth;
		innerY = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		innerX = document.documentElement.clientWidth;
		innerY = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		innerX = document.body.clientWidth;
		innerY = document.body.clientHeight;
	}
		
	// -- Determine the amount of scrolling in the page
	var scrOfX = 0, scrOfY = 0;

	if( typeof( window.pageYOffset ) == 'number' ) {
		//Netscape compliant
	    scrOfY = window.pageYOffset;
	    scrOfX = window.pageXOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		//DOM compliant
		scrOfY = document.body.scrollTop;
		scrOfX = document.body.scrollLeft;
	} else if( document.documentElement &&
		( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		//IE6 standards compliant mode
	    scrOfY = document.documentElement.scrollTop;
	    scrOfX = document.documentElement.scrollLeft;
	}
	
	theIFrame.style.left    =  ( ( innerX - w ) / 2 ) + scrOfX + 'px';
	theIFrame.style.top     =  ( ( innerY - h ) / 2 ) + scrOfY + 'px';

}


function getAvailableWinSpace() {

	var x, y;
	
	if (self.innerHeight) { 
		// all except Explorer
		x = self.innerWidth;
		y = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight)	{  
		// Explorer 6 Strict Mode
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	} else if (document.body) {  
		// other Explorers
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	
	return { x : x, y : y }}


function getWinScrolling(){

	var x = 0, y = 0;

	if( typeof( window.pageYOffset ) == 'number' ) {
		// Netscape compliant
		x = window.pageXOffset;
	    y = window.pageYOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		// DOM compliant
		x = document.body.scrollLeft;
		y = document.body.scrollTop;
	} else if( document.documentElement &&
		( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		// IE6 standards compliant mode
	    x = document.documentElement.scrollLeft;
	    y = document.documentElement.scrollTop;
	}
	
	return { x : x, y : y }}



function showHideSpan( objSpan ){
	
	theSpan = document.getElementById( objSpan );
	theSpan.style.display = ( ( theSpan.style.display == "block" ) ? "none" : "block" );}


function showQuestion( sectionId, questionId ){
	
	// Change the section's +/- icon
	var objImg = document.getElementById( 'img_' + sectionId );
	var imgSrc = objImg.src;
	objImg.src = '/images/tables/icon_-.gif';

	// Expand the Section
	var objSection = document.getElementById( 'section_' + sectionId );
	objSection.style.display = "block";

	// Change the question's +/- icon
	objImg = document.getElementById( 'img_pm_' + questionId + '_' + sectionId );
	imgSrc = objImg.src;
	objImg.src = '/images/tables/icon_-.gif';

	// Expand the Question
	var objQuestion = document.getElementById( 'item_q_' + questionId + '_ss_' );
	objQuestion.style.display = "block";
	//Focus on the question
	objQuestion.focus();}


function showFAQs( theOption, theLanguage ) 
{
	/*
	var theParams = theOption.split( '|' );
	location.href = 'faq.asp?l=' + theLanguage + '&m=' + theParams[1] + '&sc=' + theParams[0] + '&f=' + theParams[2];
	*/
	var theParams = theOption.split( '|' );
	var theLoc	  = 'faq.asp?l=' + theLanguage + '&sc=' + theParams[0];
	if ( theParams[1] && theParams[1] != '' ) {
		theLoc += '&m=' + theParams[1];
	}
	if ( theParams[2] && theParams[2] != '' ) {
		theLoc += '&f=' + theParams[2];
	}
	location.href = theLoc;}

function showFAQsx(theOption, theLanguage){
	/*
	var theParams = theOption.split( '|' );
	location.href = 'faq.aspx?l=' + theLanguage + '&m=' + theParams[1] + '&sc=' + theParams[0] + '&f=' + theParams[2];
	*/
	var theParams = theOption.split( '|' );
	var theLoc	  = 'faq.aspx?l=' + theLanguage + '&sc=' + theParams[0];
	if ( theParams[1] && theParams[1] != '' ) {
		theLoc += '&m=' + theParams[1];
	}
	if ( theParams[2] && theParams[2] != '' ) {
		theLoc += '&f=' + theParams[2];
	}
	location.href = theLoc;}

 
function showHideHelp( objSpan, status ){

	var theSpan = document.getElementById( objSpan );
	
	if ( status == 1 ) {
		var x = 0;
		var y = 0;
		var theRef  = document.getElementById( 'selType' );
		var element = theRef;

		while ( element ) {
			x += element[ 'offsetLeft' ];
			y += element[ 'offsetTop' ];
			element = element.offsetParent;
		}
		
		theSpan.style.left = x + 'px';
		theSpan.style.top  = y + ( theRef.offsetHeight * 3 ) + 'px';
		theSpan.style.display = "block";
	} 
	else {
		theSpan.style.display = "none";
	}
}


function toggleFAQSection( oSectionHeader, sectionId ){

	// -- Toggle the images +/-
	with ( document.getElementById( 'img_' + sectionId ) ) 
		src = ( src.indexOf( 'plus.gif' ) > -1 ) ? '/images/tables/book_minus.gif' : '/images/tables/book_plus.gif';
	
    // Highlight the section's text if necessary
    oSectionHeader.className = oSectionHeader.className == 'faq_secHeader' ? 'faq_secHeader_bold' : 'faq_secHeader';
    
    // -- Show/Hide the span    
	var oSpan = document.getElementById( 'section_' + sectionId );
	
	oSpan.style.display = ( ( oSpan.style.display == 'block' ) ? 'none' : 'block' );}


function swapImgs( obj, img1, img2, altTxtImg1, altTxtImg2 ){
    
    theImg = document.getElementById( obj );
    
    currentImg = theImg.src.substr( theImg.src.lastIndexOf("/") + 1 );
    
    if ( currentImg == img1 ) {
        theImg.src = theImg.src.substr( 0, theImg.src.lastIndexOf("/") + 1 ) + img2;
        theImg.alt = altTxtImg2;
    } else {
        theImg.src = theImg.src.substr( 0, theImg.src.lastIndexOf("/") + 1 ) + img1;
        theImg.alt = altTxtImg1;
    }
    
}



function testBrowser(){
		var NS6 = (!document.all && document.getElementById)?true:false;
		var IE  = ((document.all)&&(navigator.appVersion.indexOf("MSIE"!=-1)))?true:false;
		var NS4 =  (!(document.all)&&(navigator.appVersion.indexOf("5.0"==-1)))?true:false;
	
		//alert(NS4);
		/*if ( ! (document.all)) { 
			if (navigator.appVersion.indexOf("5.0")== -1) 
				var NS4 = 
				window.location="ienn4.htm";
		}*/


		
		if ((NS4)||(NS6)){
			//alert("Netscape");
			displayNS6();
		}else if (IE){
			//display();
			//alert("Internet Explorer");
		}
	}
	

	function displayNS6(){
			
			var spanTags = "";
			alert(document.getElementsByTagName('div').length);

			var spanTags = document.getElementsByTagName('span');

			var len = spanTags.length ;
			
			var spans = new Array(len);
			var m = 0;		
			
			for (var i = 0; i < spanTags.length; i++ ) { 
				
				if ((spanTags[i].id.length > 0)&& (spanTags[i].id.indexOf('item')!= -1)){
					spans[m] = spanTags[i];
					m  = m + 1;
					
				}
			}  
						
			for (var pp1 = 0; pp1 < spans.length; pp1++){
				if (spans[pp1].style.display == "none"){
					spans[pp1].style.display = "inline";
				}
			}		
		
	
	}

function ToggleSpanImg( spanObj, imgObj ){ 

	var theSpan = document.getElementById( spanObj );
	var theImg	= document.getElementById( imgObj );
	
	// -- Toggle the +/- image
	var theSrc = theImg.src
	if ( theSrc.substr( theSrc.length - 10 ) == 'icon_+.gif' ) {
		theImg.src = theSrc.substring( 0, theSrc.lastIndexOf( 'icon_+.gif' ) ) + 'icon_-.gif';
	} else {
		theImg.src = theSrc.substring( 0, theSrc.lastIndexOf( 'icon_-.gif' ) ) + 'icon_+.gif';
	}
	
	// Show/hide the span
	// theSpan.style.display == "block" ? theSpan.style.display = "none" : theSpan.style.display = "block"
	theSpan.style.display = theSpan.style.display == "block" ? "none" : "block";
}


function toggleFlashComp( spanObj ){ 

	spanTags = document.getElementsByTagName( 'span' ); 
	for ( var i = 0; i < spanTags.length; i++ ) { 
		spanTags[i].style.display = "none";
	}

	var theSpan = document.getElementById( spanObj );
	theSpan.style.display == "block" ? theSpan.style.display = "none" : theSpan.style.display = "block"
}	


function disappear1(obj){
	
	//alert(obj.id);
	
	var NS6 = (!document.all && document.getElementById)?true:false;
	var IE  = ((document.all)&&(navigator.appVersion.indexOf("MSIE"!=-1)))?true:false;
	var m=0;
	var k = 0;
	var pos = 0;
	var j = 0;
	
	//if (IE || NS6){
		var spanTags = "";
		spanTags = document.getElementsByTagName( 'span' ); 
		var spans = new Array();
			
		for (var i = 0; i < spanTags.length; i++ ) { 
			if ((spanTags[i].id != "" )&& (spanTags[i].id.indexOf('item')!= -1)){
				spans[m] = spanTags[i];
				m  = m + 1;
			}
		}
		m = 0;
		for (var j = 0; j < spans.length; j ++){
			//if (spans[j].id == document.getElementById(obj).id){
			if (spans[j].id == obj.id){
				var pos = 0;
				pos = j;
				break;
			}	
		}
	
		j = 0;

		for ( var k = 0; k < spans.length; k++) { 
			if (k == pos) {
				if (spans[k].style.display == 'none'){
					spans[k].style.display = '';
				} else if (spans[k].style.display == ''){
					spans[k].style.display = 'none'	;
				}	
			}else{
				if (spans[k].style.display == ''){
					spans[k].style.display = 'none'	;
				}
			}	
		} 
 	//}
}

/********************************************************************************************************
Modify the SCR and ALT attributes of the given image. Created mainly for blocks that can expand/collapse.

Attributes:
    obj         - Imagen object
    img1        - Name of the 1st image (just the name, it should not contain the complete file path)
    img2        - Name of the 2nd image
    altTxtImg1  - ALT text associated to Image 1
    altTxtImg2  - ALT text associated to Image 2
********************************************************************************************************/
function swapImages( obj, img1, img2, altTxtImg1, altTxtImg2 ){
    
    objImg = obj.src
    currentImg = objImg.substr( objImg.lastIndexOf("/") + 1 );
    
    if ( currentImg == img1 ) {
        obj.src = objImg.substr( 0, objImg.lastIndexOf("/") + 1 ) + img2;
        obj.alt = altTxtImg2;
    } else {
        obj.src = objImg.substr( 0, objImg.lastIndexOf("/") + 1 ) + img1;
        obj.alt = altTxtImg1;
    }
    
}


function disappear( spanObj ){ 
	
		var NS6 = (!document.all && document.getElementById)?true:false;
		var IE  = ((document.all)&&(navigator.appVersion.indexOf("MSIE"!=-1)))?true:false;
		
 	var spanTags = "";
		spanTags = document.getElementsByTagName( 'span' ); 
		len = spanTags.length ;
		//var ks = len / 2;
	
		var spans = new Array(len);
		var m = 0;		
		for ( var i = 0; i < spanTags.length; i++ ) 
		  { 
				if ( ( spanTags[i].id.length > 0 ) && ( spanTags[i].id.indexOf('item')!= -1) ){
						spans[m] = spanTags[i];
						m = m + 1;
				}
		}  
		
		
 
	//var spanId = document.getElementById( spanObj );
	
	//if (IE){
 	for ( var j = 0; j < spans.length; j ++ ){
        if ( spans[j].id == spanObj )	{
			var pos = 0;
			pos = j;
			break;
		}	
	}
		
	for ( var k = 0; k < spans.length; k++ ) {
	
	    if ( k == pos ) {
    		if ( spans[k].style.display == "none" ){
    			spans[k].style.display = "block";
			} 
			else if ( spans[k].style.display == "block" ) {
    			spans[k].style.display = "none"	;
			}
		} else {
		    if ( ( spans[k] ) && ( spans[k].style.display == "block" ) ){
    			spans[k].style.display = "none"	;
			}
		}	
	}	

	/*}else if(NS6){
		/*for (var pp = 0; pp < spans.length; pp++){
			if (spans[pp].style.display == "none"){
				spans[pp].style.display = "inline";
			}
		}	
	} 	*/	

 }	

 function testFunction(){
 	
 	var NS6 = (!document.all && document.getElementById)?true:false;
	var IE  = ((document.all)&&(navigator.appVersion.indexOf("MSIE"!=-1)))?true:false;
	

	
	if (NS6)	{
 	var spanTags = "";
	spanTags = document.getElementsByTagName( 'span' ); 
	len = spanTags.length ;
	var ks = len / 2;
	
	var spans = new Array(len/2);
	var m = 0;		
	for (var i = 0; i < spanTags.length; i++ ) { 
		
		if ((spanTags[i].id.length > 0) && (spanTags[i].id.indexOf('item')!= -1)){
			
			spans[m] = spanTags[i];
			m  = m + 1;
			
		}
	}  
	
	
	for (var pp1 = 0; pp1 < spans.length; pp1++){
	
			if (spans[pp1].style.display == "none"){
					//spans[k].id.className = '';
					spans[pp1].style.display = "inline";
					
				}
		}		
 	}
 } 
 
 
function getFAQLocation( lang, faqID ){

   var ref = '/DNA/faq/faq.asp' + '?l=' + lang + '&m=' + faqID;

   return ref;
}
 
// Functions used by the LINKS page

function getRef (obj) {
	if ( typeof obj == "string" )
		obj = ( w3c ) ? document.getElementById( obj ) : document.all( obj );
	return obj;
}


function cnSwap ( elm, nc ) {
	getRef( elm ).className = nc;
}
 

function showLink( url, theTarget ) {

	if ( theTarget == null ) theTarget = "popup";
	newWin = window.open( url, theTarget, "" );
}

/* --------------------------------------------------------------------------------------------------
   These functions are related to the product pages (product support, technical specifications ...)
   -------------------------------------------------------------------------------------------------- */

	function activateTab( id ) {
	
		var maxTabs = 4;
		var tabName = new Array( "general", "specifications", "manuals", "compatibility" )
	
		// Update the color of the tab's titles
		for( i = 1; i <= maxTabs; i++ ) 
			if ( document.getElementById( 'tabTitle_' + i ) )
				document.getElementById( 'tabTitle_' + i ).className = 'tecSpecTabUnselected';
		document.getElementById( 'tabTitle_' + id ).className = 'tecSpecTabSelected';

		// Update the layout of the tabs
		for( i = 1; i <= maxTabs; i++ ) 
			if ( document.getElementById( 'tableTab_' + i ) )
				document.getElementById( 'tableTab_' + i ).className = 'tecSpecTabUnselected';
		document.getElementById( 'tableTab_' + id ).className = 'tecSpecTabSelected';

		// Show the corresponding content
		for( i = 1; i <= maxTabs; i++ )
			if ( document.getElementById( 'section_' + i ) )
				document.getElementById( 'section_' + i ).className = 'sectionDeactivated';
		document.getElementById( 'section_' + id ).className = 'sectionActivated';
		
		// Update the hidden field containing the current opened tab
		document.getElementById( "activeTab" ).value = tabName[ id - 1 ];
	}


	function getTechSpecs( model, lang ){

		var theSection = document.getElementById( "section_2" );

		if ( theSection.innerHTML.indexOf( 'table' ) != -1 ) return null;  // Retrieve the specifications just once

		var theURL = "/main/getTechSpecs.asp?m=" + model + "&l=" + lang;

		_req  = ( window.XMLHttpRequest ) ? new XMLHttpRequest() : new ActiveXObject( "Microsoft.XMLHTTP" );
		_req.open( "GET", theURL, true );
		_req.onreadystatechange =  	function() {
										if ( _req.readyState == 4 ) {
											if ( _req.status == 200 ) {
												theSection.innerHTML = _req.responseText;
											}
											_req = null;
										}
									}
		_req.send( null );
	}
	
	
	function getModelManuals( model, lang, mainCat, subCat ) {

		// var theSection = document.getElementById( "section_3" );
		// if ( theSection.innerHTML.indexOf( 'table' ) != -1 ) return null;  // Retrieve the manuals just once
		
		var theSection = document.getElementById( "divManTable" );
		if ( theSection.innerHTML.indexOf( 'tblManuals' ) != -1 ) return null;  // Retrieve the manuals just once
		
		/*
		var theURL = "/main/getModelManuals.asp?l=" + lang + "&m=" + model + "&mc=" + mainCat + "&sc=" + subCat;

		_req  = ( window.XMLHttpRequest ) ? new XMLHttpRequest() : new ActiveXObject( "Microsoft.XMLHTTP" );
		_req.open( "GET", theURL, true );
		_req.onreadystatechange =  	function() {
										if ( _req.readyState == 4 ) {
											if ( _req.status == 200 ) {
												theSection.innerHTML = _req.responseText;
											}
											_req = null;
										}
									}
		_req.send( null );
		*/
		var httpRequest = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject( "Microsoft.XMLHTTP" );
		if ( httpRequest ) {
			httpRequest.open( 'GET', '/shared/code/supportwebservs.asmx/getManualsList?cat=' + mainCat + '&subCat=' + subCat + '&model=' + model + '&l=' + lang, true );
			httpRequest.onreadystatechange = function () 
											 {
												if ( httpRequest.readyState == 4  ) {
													if ( httpRequest.status == 200  ) {
														try {
															httpRequest.responseXML.normalize(); } 
														catch ( e )  {
															// Do nothing. The above is only needed for firefox which truncates the text nodes that are too big 
															// into small pieces (also text nodes)
														}	
														theSection.innerHTML = httpRequest.responseXML.getElementsByTagName( 'string' )[0].childNodes[0].nodeValue;
													}
												}
											 }
			httpRequest.send( null );
		}
		
	}	


	function showHideTecSpecs( id ) {
		var theSpan = document.getElementById( 'specCat_' + id );
		theSpan.style.display = ( ( theSpan.style.display == "block" ) ? "none" : "block" );
		var theImg	= document.getElementById( 'specCatImg_' + id );
		theImg.src  = ( ( theSpan.style.display == "block" ) ? "/images/tables/icon_-.gif" : "/images/tables/icon_+.gif" );
	}


	function getDVDCompatibility( model, cat, lang ){
		var theSection = document.getElementById( "section_4" );

		if ( theSection.innerHTML.indexOf( 'table' ) != -1 ) return null;  // Retrieve the compatibility info just once
		
		// var theURL = "/main/getDVDCompatibility.asp?m=" + model + "&sc=" + cat + "&l=" + lang;
		 var theURL = '/shared/code/supportwebservs.asmx/getDvdCompatibility?m=' + model + '&sc=' + cat + '&l=' + lang

		_req  = ( window.XMLHttpRequest ) ? new XMLHttpRequest() : new ActiveXObject( "Microsoft.XMLHTTP" );
		_req.open( "GET", theURL, true );
		_req.onreadystatechange =  	function() {
										if ( _req.readyState == 4 ) {
											if ( _req.status == 200 ) {
												theSection.innerHTML = _req.responseText;
											}
											_req = null;
										}
									}
		_req.send( null );
	}


	