// JScript File

var qsParm = new Array();
var query = window.location.search.substring(1);
var parms = query.split('&');
var contentData="";
if(parms.length > 0)
{
    //Here we are considering only Ist querystring value
    //We are not bothering about rest querystring added intentionally by any unwanted user
    //Means very first value of querystring should be "OpenCL"
    //Otherwise it will not show the opencl info
    var pos = parms[0].indexOf('=');
    if (pos > 0) 
    {
        var key = parms[0].substring(0,pos);    //holding the data of Javascript key  like "lan"
        var val = parms[0].substring(pos+1);    //holding the data of javascript value like "OpenCL"
        qsParm[key] = val;
        //Condition to check whether querystring is null/blank or value not equal to "opencl"
        //If Condition true then it will show the regular parallel computing information
        //Otherwise it will show the openCL info specifically
        
        //In this function we are changing text into lower case 
        //because it might possible that user will write "openCL" instead "OpenCL"
        //Means it will show result in all condition, 
        //because JS is case sensitive and it will not effect on result due to casing
        if((val=="") || (val.toLowerCase() !="opencl"))
        {
            SetNormalText();      //Calling a function to write parallel computing info          	
        }
        else
        {                
            //Calling a setNewColor function from javascripting on parallelcomputing page itself
            //Here we are passing the value "tdOpenCL" which is in actual opencl tab value
            //So that it will call the right switch condition insite setNewColor() function
            //and show the OpenCL information properly as per client requirement.
            setNewColor('tdOpenCL');    
        }
    }
    else
    {
        SetNormalText();
    }
}

//Funciton to show the regular parallel computing information
function SetNormalText()
{
    document.getElementById("spnHeading").innerHTML="Parallel Computing";

    contentData = contentData + '<table width="740px" cellpadding="0" cellspacing="0">';
    contentData = contentData + '<tr><td valign="Top">';
    contentData = contentData + 'The advent of programmable graphics hardware, commonly known as GPUs, has opened up a new paradigm ';
    contentData = contentData + 'in high performance computing as well as mainstream parallel computing industries.&nbsp;&nbsp;Performance ';
    contentData = contentData + 'hungry applications can now tap into these new massively parallel processors, also referred to as ';
    contentData = contentData + 'many-core processors, and achieve orders of magnitude speedups at a fraction of a cost.&nbsp;&nbsp;This ';
    contentData = contentData + 'technology has huge implications for various industries including manufacturing, oil & gas, financial ';
    contentData = contentData + 'services and medical among others. <br/><br/>';
    contentData = contentData + 'VizExperts is a pioneer in GPU Compute technologies and offers integrated solutions including consulting, ';
    contentData = contentData + 'software, systems and services in various industries.&nbsp;&nbsp;Our software stack is based on Open ';
    contentData = contentData + 'Standards and open source software components and reflects our expertise around COTS components including ';
    contentData = contentData + 'FOSS tools as well as vendor-provided system-architectures, drivers and middleware.&nbsp;&nbsp;With ';
    contentData = contentData + 'VizExperts software, you are guaranteed to get the best possible performance on a given GPU architecture. ';
    contentData = contentData + '</td></tr></table>';

    document.getElementById("dvContent").innerHTML=contentData;
}

