﻿function HLHideCaption(id) 
{
    var Caption = document.getElementById('Caption_' + id);
    var HL = document.getElementById(id)
    if (Caption != null) 
    {
        Caption.style.display = 'none';
    }
}
function HLShowCaption(id) 
{
    var Caption = document.getElementById('Caption_' + id);
    var HL = document.getElementById(id)

    if (Caption != null) 
    {
        Caption.style.display = 'block';
    }
}
function GetQueryString(KeyName)
{
	URL = window.location.search.substring(1);
	URLSplitted = URL.split("&");
	for (i = 0; i < URLSplitted.length; i++) 
	{
		ft = URLSplitted[i].split("=");
		if (ft[0] == KeyName) 
		{
			return ft[1];
		}
	}
}
function PreviewVideo(VideoIndex)
{
	var Index = parseInt(VideoIndex);
	var SLInitParams = document.getElementById('initparams');
	switch(Index)
	{
		case 1:
			SLInitParams.value = "playerSettings = <Playlist><AutoLoad>true</AutoLoad>" + 
								 "<AutoPlay>false</AutoPlay>" + 
								 "<DisplayTimeCode>false</DisplayTimeCode>" + 
								 "<EnableOffline>true</EnableOffline>" + 
								 "<EnablePopOut>true</EnablePopOut>" + 
								 "<EnableCaptions>true</EnableCaptions>" + 
								 "<EnableCachedComposition>true</EnableCachedComposition>" + 
								 "<StretchNonSquarePixels>NoStretch</StretchNonSquarePixels>" + 
								 "<StartMuted>false</StartMuted>" + 
								 "<StartWithPlaylistShowing>false</StartWithPlaylistShowing>" +
                            	 "<Items>" +
								"<PlaylistItem><AudioCodec>WmaProfessional</AudioCodec>" +
								"<Description></Description>" +
								"<FileSize>50137158</FileSize>" +
							    "<IsAdaptiveStreaming>false</IsAdaptiveStreaming>" +
								"<MediaSource>Images/Tank1.wmv</MediaSource>" +
								"<ThumbSource>VID1_Frame0.jpg</ThumbSource>" +
								"<Title>Tarabay Egypt - Videos - Tank Mechanics Demo</Title>" + 
								"<DRM>false</DRM>" + 
								"<VideoCodec>VC1</VideoCodec>" + 
								"<FrameRate>30</FrameRate>" + 
								"<Width>512</Width><Height>384</Height>" +
								"<AspectRatioWidth>4</AspectRatioWidth><AspectRatioHeight>3</AspectRatioHeight>" +
								"<Chapters><ChapterItem><Position>108.736</Position><ThumbSource>VID1_Frame1.jpg</ThumbSource><Title>Camera</Title></ChapterItem>" +
								"<ChapterItem><Position>181.227</Position><ThumbSource>VID1_Frame2.jpg</ThumbSource><Title>Rotation</Title></ChapterItem>" +
								"<ChapterItem><Position>263.395</Position><ThumbSource>VID1_Frame3.jpg</ThumbSource><Title>Mud</Title></ChapterItem>" +
								"<ChapterItem><Position>356.195</Position><ThumbSource>VID1_Frame4.jpg</ThumbSource><Title>Reversing</Title></ChapterItem>" +
								"<ChapterItem><Position>370.110</Position><ThumbSource>VID1_Frame5.jpg</ThumbSource><Title>Inclined%20terrain</Title></ChapterItem>" +
								"<ChapterItem><Position>418.001</Position><ThumbSource>VID1_Frame6.jpg</ThumbSource><Title>Joystick</Title></ChapterItem>" +
								"<ChapterItem><Position>435.213</Position><ThumbSource>VID1_Frame7.jpg</ThumbSource><Title>Rotation</Title></ChapterItem>" +
                                "<ChapterItem><Position>471.952</Position><ThumbSource>VID1_Frame8.jpg</ThumbSource><Title>Video%20Out</Title></ChapterItem></Chapters>" +
                                "</PlaylistItem></Items></Playlist>";
			break;
        case 2:
            break;
        default:
        	break;
	}
}
function PreviewImage(ImageIndex)
{
	var Index = parseInt(ImageIndex);
	var CaptionContent = document.getElementById('CaptionContent');
	var ImagePreview = document.getElementById('ImagePreview');
	
	switch(Index)
	{
		case 1:
			ImagePreview.src = "Images/preparations Marriot/100_0235.JPG";
			ImagePreview.alt = CaptionContent.innerText = "CCTV Installation in Marriot";
			break;
        case 2:
            ImagePreview.src = "Images/preparations Marriot/100_0236.JPG";
            ImagePreview.alt = CaptionContent.innerText = "CCTV Installation in Marriot";
            break;
        case 3:
        	ImagePreview.src = "Images/preparations Marriot/100_0238.JPG";
            ImagePreview.alt = CaptionContent.innerText = "CCTV Installation in Marriot";
        	break;
        case 4:
        	ImagePreview.src = "Images/preparations Marriot/100_0240.JPG";
            ImagePreview.alt = CaptionContent.innerText = "CCTV Installation in Marriot";
        	break;
		case 5:
			ImagePreview.src = "Images/preparations Marriot/100_0242.JPG";
            ImagePreview.alt = CaptionContent.innerText = "CCTV Installation in Marriot";
        	break;
		case 6:
			ImagePreview.src = "Images/preparations Marriot/100_0245.JPG";
            ImagePreview.alt = CaptionContent.innerText = "CCTV Installation in Marriot";
        	break;
		case 7:
			ImagePreview.src = "Images/preparations Marriot/100_0246.JPG";
            ImagePreview.alt = CaptionContent.innerText = "CCTV Installation in Marriot";
        	break;
        case 8:
	        ImagePreview.src = "Images/preparations Marriot/27092009367.jpg";
            ImagePreview.alt = CaptionContent.innerText = "CCTV Installation in Marriot";
        	break;
		case 9:
			ImagePreview.src = "Images/preparations Marriot/100_0243.JPG";
            ImagePreview.alt = CaptionContent.innerText = "CCTV in Marriot";
        	break;
		default:
			break;
	}
}
function ShowTab(HyperlinkID, HeaderID, PanelID)
{
	if(HyperlinkID.className == "HLNavigation")
	{
	    HyperlinkID.className = "HLDisabled";
		
		HeaderID.style.display = "block";
		PanelID.style.display = "block";
		return 1;
	}
	else return 0;
}
function HideTab(HyperlinkID, HeaderID, PanelID)
{
	if(HyperlinkID.className == "HLDisabled")
	{
		HyperlinkID.className = "HLNavigation";
		
		HeaderID.style.display = "none";
		PanelID.style.display = "none";
	}
}
function LoadProductDetails(HeaderPanel, ProductDetailsPanel, ImagesPanel, ProductID)
{
	var PID = parseInt(ProductID);
	switch(PID)
	{
		case 1:
			HeaderPanel.innerText = "MICROCONTROLLER BOARD - GB18B";
			ProductDetailsPanel.innerText = "Size: 13.5 x 6.5 mm (credit-card sized).\nFit all Microchip PIC® DIP 40-pin family.\n33I/O available through a 5.08 mm PCB screw terminal.\n10 Bit ADC multiplexed on 8input channels.\nMAX 232 for full duplex RS-232C interface.\n4 pin header for I²C & SPI interface.\nOne PWM output with protected power transistor to drive higher inductive load (DC Motor, Heater, Lamps…..).\nInfrared detector for remote control option (optional).\nIDC connector for 4/8 line LCD interface.\nSolid state temperature sensor – 40C to + 125C (optional).\nCrystal 4, 10, 20 MHz.\nHeart beat LED."
			ImagesPanel.innerHTML = "<img alt='" + "DGS 1" + "'" + "src='" + "Images/MCB_GB18B.jpg' />";
			break;
		case 2:
			HeaderPanel.innerText = "MICROCONTROLLER BOARD - GB18S";
			ProductDetailsPanel.innerText = "Size: 8.3x4.8 mm (credit-card sized).\nFit all 18 pin family (PIC 16F84, 84A, 628)\n16 I/O available through a 5.08 mm PCB screw terminal.\nMAX 232 for full duplex RS-232C interface.\nIsolated Power regulator to get power direct from PC serial port or form up to 25 volt external supply.\nInfrared detector for remote control option (optional).\nCrystal 4, 10, 20 MHz.\nHeart beat LED";
			ImagesPanel.innerHTML = "<img alt='" + "DGS 1" + "'" + "src='" + "Images/MCB_GB18S.jpg' />";
			break;
		case 3:
			HeaderPanel.innerText = "MICROCONTROLLER BOARD - GBRJ";
			ProductDetailsPanel.innerText = "Size: 17.6 x 10.8 mm\nFit all Microchip PIC® DIP 40-pin family.\n55 I/O available through a RJ45, PCB screw terminal or IDC.\n10 Bit ADC multiplexed on 13 input channels.\nMAX 232 for full duplex RS-232C interface.\n4 pin header for I²C & SPI interface.\nTen power output up to 1000 mA (DC Motor, Heater, Lamps…..) .\nInfrared detector for remote control option (optional).\nIDC connector for 4/8 line LCD interface.\nSolid state temperature sensor – 40C to + 125C (optional).\nCrystal 4, 10, 20 MHz.\nHeart beat LED.";
			ImagesPanel.innerHTML = "<img alt='" + "DGS 1" + "'" + "src='" + "Images/MCB_GBRJ.jpg' />";
			break;
		case 4:
			HeaderPanel.innerText = "MICROCONTROLLER FULL SYSTEM - Automatic Temperature Control System";
			ProductDetailsPanel.innerText = "Automatic temperature control system (ATS) is a microcontroller-based system that is designed for GSM sites. Its main function is to ensure safe and reliable environment for the controlled site.\nThrough controlling air-conditioning system, it always maintains the site temperature at the desired value which is adjusted by the temperature sensor. Should any fire condition happens, the system responds immediately and protect the site by turning OFF the air-conditioning system, and sending an alarm to the main control unit. The alarm will not be removed till personnel go to the site and investigate the case.\n\nHigh temperature condition is treated as important as well. The system respond directly by turning the air-conditioning system ON to decrease the temperature till it reach the desired value.\nThe system controls two Air-conditions (AC1, AC2) through a time duration operation for 1 hour , 2 hours , 3 hours ,or 4 hours according to manual selection in normal condition.\nThe user has the choice to use the automatic mode, or the manual mode, in which the AC's are operated manually and in this case the user must shutdown both also manually.\n\nThe system is general-purpose for use in any desired location,and More than 2 air-conditions can be controlled according to customer demand. It is highly effective, operate safely and reliably.\n\nThe system is available for demo upon your request. For more information and brochures, please contact TarabayEgypt.";
			ImagesPanel.innerHTML = "<img alt='" + "ATS outside" + "'" + "src='" + "Images/ATS_out.jpg' />" + " <img alt=" + "'ATS on site' src='Images/ATS_site.jpg' />";
			break;
		case 5:
			HeaderPanel.innerText = "MICROCONTROLLER FULL SYSTEM - Data Guard System";
			ProductDetailsPanel.innerText = "Data Guard System (DGS) is an RF security system. Its main function is to protect Hardware equipment from being stolen, acting as an anti-theft system for personal computers, mobile devices, and any valuable equipment.\n\nAs any RF system, it consists of transmitter(s) and receiver(s). The transmitter is installed inside the equipment to be protected, sealed and very hard to be taken off.\n\nIt begins transmission at a constant frequency if the equipment is moved from it's location for a certain period of time. As long as the equipment is moving, whatever inside a car, or hand held, the transmitter is sending a predefined packet of data continuously. This data contain the equipment ID and its location and another data.\n\nOn the other hand, the receiver panel is installed within the main building gates. Whenever a transmitter enters its guarding zone, which is about 200 meters, it produces a visual and audible alarm, from a siren and a flashing beacon. In its advanced version, it is serially connected to a PC and it displays information about the equipment and its location, which is transmitted as indicated above. Security guards can now catch the equipment and the thief before even he feels.\n\nThis system is tested and verified and installed. It proves an efficient operation. One receiver panel can handle more then 100 transmitting tags within the guarded zone. The system is dynamic and can be used in any purpose with any specification according to the customer needs.\n\nThe new add-on for this system is a handheld RF receiver. It is used on-site, by security personnel against moving vehicles or infantry away from the security gates. It indicates whether guarded equipment is being taken, wherever its location is. It is very useful for large areas.\n\nThe system is available for demo upon your request. For more information and brochures, please contact TarabayEgypt.";
			ImagesPanel.innerHTML = "<img alt='" + "DGS 1" + "'" + "src='" + "Images/txrx_2.jpg' />" + " <img alt=" + "'DGS Hand' src='Images/hand_txrx.jpg' />" + " <img alt=" + "'DGS Tags' src='Images/TAGS.jpg' />";
			break;
		default:
			break;
	}
}
