﻿// JScript File
// JavaScript Document

 
 function CreateEventRecords(tblId,totalCols)
 {
 var colCount=0
 var rowCount=0
 if(DataRecords=="")
 return;
   // DataRecords+="EVEN-0000-0000<>Inter BEE 2007/11/20<>2007<>11<>22<>2007<>Makuhari Messe, Chiba, Japan<>5204<>http://www.inter-bee.com/2007/en/|"; 

  var RowValues = DataRecords.split(Delimeter);
    
    TableObj=document.getElementById(tblId)
    //alert(RowValues.length)
    while(rowCount<RowValues.length-1)
    {
        colCount=0
        RowsObj=TableObj.insertRow(rowCount+1)
        //alert(RowValues.length+":"+rowCount+":"+RowValues[rowCount])
        ColValues=RowValues[rowCount++].split(InnerDelimeter)   	
        
        if(rowCount%2>0)
        {
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML="<a href=\""+ColValues[10]+"\" target=\"_blank\" class=\"HeadinText\">"+ColValues[1]+"</a>"                
            CellsObj.className="HeadinText1"
            
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML=ColValues[8]
            CellsObj.className="HeadinText1"
            
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML=GetFormatDate(ColValues[2],ColValues[3],ColValues[4],ColValues[5],ColValues[6],ColValues[7])
            CellsObj.className="HeadinText1"
            
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML=ColValues[9]
            CellsObj.className="HeadinText1"
        }
        else 
        {
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML="<a href=\""+ColValues[10]+"\" target=\"_blank\" >"+ColValues[1]+"</a>"                
            CellsObj.className="HeadinTextNo"
            
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML=ColValues[8]
            CellsObj.className="HeadinTextNo"
            
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML=GetFormatDate(ColValues[2],ColValues[3],ColValues[4],ColValues[5],ColValues[6],ColValues[7])
            CellsObj.className="HeadinTextNo"
            
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML=ColValues[9]
            CellsObj.className="HeadinTextNo"
        }
        
     }
 }
 
 function GetFormatDate(sM,sD,sY,eM,eD,eY)
 {
    if(sM==eM && sY==eY)
        return getMonth(sM)+" "+sD+"-"+eD+","+sY;
    
    return getMonth(sM)+" "+sD+","+sY+" to "+getMonth(eM)+" "+eD+","+eY;
 }

function getMonth(mon1)
{
//alert(mon)
mon=parseInt(mon1)
    switch(mon)
    {
        case 1:
            return "Jan";
            break;
        case 2:
            return "Feb";
            break;
        case 3:
            return "March";
            break;
        case 4:
            return "April";
            break;
       case 5:
            return "May";
            break;
        case 6:
            return "June";
            break;
        case 7:
            return "July";
            break;
        case 8:
            return "Aug";
        case 9:
            return "Sep";
            break;
        case 10:
            return "Oct";
            break;
        case 11:
            return "Nov";
            break;
        case 12:
            return "Dec";
            break;
            
        default: return "Jan";
        
    }
}

///Category Records display side bar////////////////////////

/*function CreateCatRecordsOnly(tblId)
{

var colCount=0
 var rowCount=0
 var actRow=0;
 if(DataCatRecords=="")
 return;
  // DataCatRecords+="CATE-0000-0000<>Video Encoders|"; 

  var RowValues = DataCatRecords.split(Delimeter);
    
    TableObj=document.getElementById(tblId)
    //alert(RowValues.length)
    while(rowCount<RowValues.length-1)
    {
        colCount=0
        ++rowCount        
        
        if(rowCount!=1)
        {
            RowsObj=TableObj.insertRow(++actRow)
            CellsObj=RowsObj.insertCell(0)
            CellsObj.innerHTML="<strong><img src=\"images/dottedStripSmall.jpg\" width=\"123\" height=\"1\" border=\"0\" /></strong>"
            CellsObj.height="1px"
            CellsObj.valign="top"
            CellsObj.align="left"
        }
       
        
        RowsObj=TableObj.insertRow(++actRow)
        ColValues=RowValues[rowCount-1].split(InnerDelimeter)
        
        CellsObj=RowsObj.insertCell(0)
        CellsObj.innerHTML="<a href=\"category.aspx?RecordID="+ColValues[0]+"\">"+ColValues[1]+"</a>"
        CellsObj.height="20px"
        CellsObj.valign="top"
        CellsObj.align="left"  
         
    }

}*/
function CreateMarketCatRecordsOnly(tblId)
{

var colCount=0
 var rowCount=0
 var actRow=0;
 if(DataCatRecords=="")
 return;
  // DataCatRecords+="CATE-0000-0000<>Video Encoders|"; 

  var RowValues = DataCatRecords.split(Delimeter);
    
    TableObj=document.getElementById(tblId)
    //alert(RowValues.length)
    while(rowCount<RowValues.length-1)
    {
        colCount=0
        ++rowCount        
        
        if(rowCount!=1)
        {
            RowsObj=TableObj.insertRow(++actRow)
            CellsObj=RowsObj.insertCell(0)
            CellsObj.innerHTML="<strong><img src=\"images/dottedStripSmall.jpg\" width=\"123\" height=\"1\" border=\"0\" /></strong>"
            CellsObj.height="1px"
            CellsObj.valign="top"
            CellsObj.align="left"
        }
       
        
        RowsObj=TableObj.insertRow(++actRow)
        ColValues=RowValues[rowCount-1].split(InnerDelimeter)
        
        CellsObj=RowsObj.insertCell(0)
        CellsObj.innerHTML="<a href=\"categorymarket.aspx?RecordID="+ColValues[0]+"\">"+ColValues[1]+"</a>"
        CellsObj.height="20px"
        CellsObj.valign="top"
        CellsObj.align="left"  
         
    }

}
function CreateOEMCatRecordsOnly(tblId)
{

var colCount=0
 var rowCount=0
 var actRow=0;
 if(DataCatRecords=="")
 return;
  // DataCatRecords+="CATE-0000-0000<>Video Encoders|"; 

  var RowValues = DataCatRecords.split(Delimeter);
    
    TableObj=document.getElementById(tblId)
    //alert(RowValues.length)
    while(rowCount<RowValues.length-1)
    {
        colCount=0
        ++rowCount        
        
        if(rowCount!=1)
        {
            RowsObj=TableObj.insertRow(++actRow)
            CellsObj=RowsObj.insertCell(0)
            CellsObj.innerHTML="<strong><img src=\"images/dottedStripSmall.jpg\" width=\"123\" height=\"1\" border=\"0\" /></strong>"
            CellsObj.height="1px"
            CellsObj.valign="top"
            CellsObj.align="left"
        }
       
        
        RowsObj=TableObj.insertRow(++actRow)
        ColValues=RowValues[rowCount-1].split(InnerDelimeter)
        
        CellsObj=RowsObj.insertCell(0)
        CellsObj.innerHTML="<a href=\"category.aspx?RecordID="+ColValues[0]+"\">"+ColValues[1]+"</a>"
        CellsObj.height="20px"
        CellsObj.valign="top"
        CellsObj.align="left"  
         
    }

}

///////////////Product sub navi/////////
function SubNaviProd(tblId)
{
//return
    TableObj=document.getElementById(tblId)
    if(DataProds=="") return;
        
        var prodRows=DataProds.split(Delimeter);        
        var pTemp="";
        
        for(i=0;i<prodRows.length-1;i++)
        {
            prodCol=prodRows[i].split(InnerDelimeter)
            
            var cats = prodCol[2].split(";")
            
            for(j=0; j<cats.length; j++)
            {
                //if(prodCol[2]==ActiveCategory)               
                if (cats[j]==ActiveCategory)
                    if(pTemp!="")                        
                        pTemp+=" | " + "<a href=\"product.aspx?RecordId="+prodCol[0]+"\">"+prodCol[1]+"</a>"
                    else
                        pTemp+="<a href=\"product.aspx?RecordId="+prodCol[0]+"\">"+prodCol[1]+"</a>"
            }
        
        }
       
       TableObj.innerHTML="&nbsp;"+pTemp
    
}
///Category/////////////
/*function CreateCategory(tblId)
{
     var colCount=0
 var rowCount=0
 var rowAct=1
 if(DataCatRecords=="")
 return;
   //DataCatRecords+="CATE-0000-0005<>Design Services<>CATE-0000-0005-img.JPG|"; 

  var RowValues = DataCatRecords.split(Delimeter);
    
    TableObj=document.getElementById(tblId)
    //alert(RowValues.length)
    while(rowCount<RowValues.length-1)
    {
        
        RowsObj=TableObj.insertRow(++rowAct)
        //alert(RowValues.length+":"+rowCount+":"+RowValues[rowCount])
        ColValues=RowValues[rowCount++].split(InnerDelimeter) 
        
        CellsObj=RowsObj.insertCell(0)
        CellsObj.innerHTML="&nbsp;"        
            
        CellsObj=RowsObj.insertCell(1)
        var temp="<a href=\"category.aspx?RecordId="+ColValues[0]+"\"  >"
        temp+="<img style=\"border:0px;\" src=\"uploadedImages/"+ColValues[2]+"\" width=\"529\" height=\"221\" /></a>"
        CellsObj.innerHTML=temp   
        
        RowsObj=TableObj.insertRow(++rowAct)        
        
        CellsObj=RowsObj.insertCell(0)
        CellsObj.innerHTML="&nbsp;"        
            
        CellsObj=RowsObj.insertCell(1)
        CellsObj.innerHTML="&nbsp;"    
        CellsObj.className="categoryText" 
        CellsObj.height="15px" 
     }


}*/

function CreateMarketCategory(tblId)
{
     var colCount=0
 var rowCount=0
 var rowAct=1
 if(DataCatRecords=="")
 return;
   //DataCatRecords+="CATE-0000-0005<>Design Services<>CATE-0000-0005-img.JPG|"; 

  var RowValues = DataCatRecords.split(Delimeter);
    
    TableObj=document.getElementById(tblId)
    //alert(RowValues.length)
    while(rowCount<RowValues.length-1)
    {
        
        RowsObj=TableObj.insertRow(++rowAct)
        //alert(RowValues.length+":"+rowCount+":"+RowValues[rowCount])
        ColValues=RowValues[rowCount++].split(InnerDelimeter) 
        
        CellsObj=RowsObj.insertCell(0)
        CellsObj.innerHTML="&nbsp;"        
            
        CellsObj=RowsObj.insertCell(1)
        var temp="<a href=\"categorymarket.aspx?RecordId="+ColValues[0]+"\"  >"
        temp+="<img style=\"border:0px;\" src=\"uploadedImages/"+ColValues[2]+"\" width=\"529\" height=\"221\" /></a>"
        CellsObj.innerHTML=temp   
        
        RowsObj=TableObj.insertRow(++rowAct)        
        
        CellsObj=RowsObj.insertCell(0)
        CellsObj.innerHTML="&nbsp;"        
            
        CellsObj=RowsObj.insertCell(1)
        CellsObj.innerHTML="&nbsp;"    
        CellsObj.className="categoryText" 
        CellsObj.height="15px" 
     }


}
function CreateOEMCategory(tblId)
{
     var colCount=0
 var rowCount=0
 var rowAct=1
 if(DataCatRecords=="")
 return;
   //DataCatRecords+="CATE-0000-0005<>Design Services<>CATE-0000-0005-img.JPG|"; 

  var RowValues = DataCatRecords.split(Delimeter);
    
    TableObj=document.getElementById(tblId)
    //alert(RowValues.length)
    while(rowCount<RowValues.length-1)
    {
        
        RowsObj=TableObj.insertRow(++rowAct)
        //alert(RowValues.length+":"+rowCount+":"+RowValues[rowCount])
        ColValues=RowValues[rowCount++].split(InnerDelimeter) 
        
        CellsObj=RowsObj.insertCell(0)
        CellsObj.innerHTML="&nbsp;"        
            
        CellsObj=RowsObj.insertCell(1)
        var temp="<a href=\"categoryOEM.aspx?RecordId="+ColValues[0]+"\"  >"
        temp+="<img style=\"border:0px;\" src=\"uploadedImages/"+ColValues[2]+"\" width=\"529\" height=\"221\" /></a>"
        CellsObj.innerHTML=temp   
        
        RowsObj=TableObj.insertRow(++rowAct)        
        
        CellsObj=RowsObj.insertCell(0)
        CellsObj.innerHTML="&nbsp;"        
            
        CellsObj=RowsObj.insertCell(1)
        CellsObj.innerHTML="&nbsp;"    
        CellsObj.className="categoryText" 
        CellsObj.height="15px" 
     }


}
//////////////////Product List////////////////

/*function ProdList(tblId)
{


    TableObj=document.getElementById(tblId)
    var prodTbl="";
    prodTbl+=" <a href=\"products.aspx\"><span class=\"ProductHeading\"> VELA PRODUCTS </span></a><br />"
    
    var currentCat=0
    var rowCount=0
   
    if(DataCatRecords=="")
    {
        TableObj.innerHTML=prodTbl
        return;
    }
    var RowValues = DataCatRecords.split(Delimeter);    
    while(rowCount<RowValues.length-1)
    {
        ColValues=RowValues[rowCount++].split(InnerDelimeter)
        prodTbl+=GetCatCode(ColValues[0],ColValues[1])
        
        if(DataProds=="") continue;
        
        var prodRows=DataProds.split(Delimeter);        
        var pTemp="";
        
        for(i=0;i<prodRows.length-1;i++)
        {
            prodCol=prodRows[i].split(InnerDelimeter)
            if(prodCol[2]==ColValues[0])
                pTemp+=GetProdCode(prodCol[0],prodCol[1])
        }
        if(pTemp!="")
            prodTbl+="<ul>"+pTemp+"</ul>"        
    }    
     
     TableObj.innerHTML=prodTbl
}*/
function MarketProdList(tblId)
{
    TableObj=document.getElementById(tblId)
    var prodTbl="";
    //prodTbl+=" <a href=\"products.aspx\"><span class=\"ProductHeading\"> SOLUTIONS </span></a><br /><br/>"
    prodTbl+=" <a><span class=\"ProductHeading\"> SOLUTIONS </span></a><br /><br/>"
    
    var currentCat=0
    var rowCount=0
   
    if(DataCatRecords=="")
    {
        TableObj.innerHTML=prodTbl
        return;
    }
    var RowValues = DataCatRecords.split(Delimeter);    
    while(rowCount<RowValues.length-1)
    {
        ColValues=RowValues[rowCount++].split(InnerDelimeter)
        prodTbl+=GetMarketCatCode(ColValues[0],ColValues[1])
        
        /*if(DataProds=="") continue;
        
        var prodRows=DataProds.split(Delimeter);        
        var pTemp="";
        
        for(i=0;i<prodRows.length-1;i++)
        {
            prodCol=prodRows[i].split(InnerDelimeter)
            if(prodCol[2]==ColValues[0])
                pTemp+=GetProdCode(prodCol[0],prodCol[1])
        }
        if(pTemp!="")
            prodTbl+="<ul>"+pTemp+"</ul>"       */ 
    }    
     
     TableObj.innerHTML=prodTbl
}
function OEMProdList(tblId)
{


    TableObj=document.getElementById(tblId)
    var prodTbl="";
    //prodTbl+=" <a href=\"products.aspx\"><span class=\"ProductHeading\"> VELA OEM PRODUCTS </span></a><br /><br/>"
    prodTbl+=" <a><span class=\"ProductHeading\"> VELA OEM PRODUCTS </span></a><br /><br/>"
    
    var currentCat=0
    var rowCount=0
   
    if(DataCatRecords=="")
    {
        TableObj.innerHTML=prodTbl
        return;
    }
    var RowValues = DataCatRecords.split(Delimeter);    
    while(rowCount<RowValues.length-1)
    {
        ColValues=RowValues[rowCount++].split(InnerDelimeter)
        prodTbl+=GetOEMCatCode(ColValues[0],ColValues[1])
        
        /*if(DataProds=="") continue;
        
        var prodRows=DataProds.split(Delimeter);        
        var pTemp="";
        
        for(i=0;i<prodRows.length-1;i++)
        {
            prodCol=prodRows[i].split(InnerDelimeter)
            if(prodCol[2]==ColValues[0])
                pTemp+=GetProdCode(prodCol[0],prodCol[1])
        }
        if(pTemp!="")
            prodTbl+="<ul>"+pTemp+"</ul>"      */  
    }    
     
     TableObj.innerHTML=prodTbl
}

/*function GetCatCode(catId,catText)
{
    var temp=""
    temp+="<a href=\"category.aspx?RecordId="+catId+"\">"
    temp+="<strong>"+catText+"</strong></a><br /><br />"
    
    return temp
}*/
function GetMarketCatCode(catId,catText)
{
    var temp=""
    temp+="<a href=\"categorymarket.aspx?RecordId="+catId+"\">"
    temp+="<strong>"+catText+"</strong></a><br /><br />"
    
    return temp
}
function GetOEMCatCode(catId,catText)
{
    var temp=""
    temp+="<a href=\"categoryOEM.aspx?RecordId="+catId+"\">"
    temp+="<strong>"+catText+"</strong></a><br /><br />"
    
    return temp
}
function GetProdCode(prodId,prodText)
{
    var temp=""
    temp+="<li><a href=\"product.aspx?RecordId="+prodId+"\">"+prodText+"</a> </li>"    
    
    return temp
}

//////////////////Archive/////////////////////

function CreateArchiveRecords(tblId)
{
//alert(currYear)
//alert(document.getElementById("textYear1"))
document.getElementById("textYear1").innerHTML="Following you will find Vela Press Releases issued during "+currYear+". "

document.getElementById("textYear2").innerHTML="<p align=\"center\" class=\"Presstext style1\"><strong>"+currYear+"&nbsp;Releases</strong></p>"

var colCount=0
 var rowCount=0
 if(DataRecords=="")
 return;
  // DataRecords+="NEWS-0000-0001<>Vela Announces MediaAdvantage System for High-Spee<>11<>30<>2006<>NEWS-0000-0001-pdfs.PDF|"; 
 
  var RowValues = DataRecords.split(Delimeter);
    
    TableObj=document.getElementById(tblId)
    //alert(RowValues.length)
    while(rowCount<RowValues.length-1)
    {
        colCount=0
        RowsObj=TableObj.insertRow(rowCount)
        //alert(RowValues.length+":"+rowCount+":"+RowValues[rowCount])
        ColValues=RowValues[rowCount++].split(InnerDelimeter)
        
        CellsObj=RowsObj.insertCell(colCount++)
        CellsObj.innerHTML=ColValues[3]+"-"+getMonth(ColValues[2])+"-"+ColValues[4]
        CellsObj.className="Presstext1"
        CellsObj.width="100px"     
          	
        if (ColValues[5]!="")
        {
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML="<a href=\"uploadedDocs/"+ColValues[5]+"\" >"+ColValues[1]+"</a><br /><br />"                
            CellsObj.className="Presstext1"
                  
            
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML="<a href=\"uploadedDocs/"+ColValues[5]+"\" ><img  style=\"border:0px\" src=\"images/pdflogo.gif\" width=\"16\" height=\"16\" /></a>"                
            CellsObj.className="Presstext1"
        }
        else
        {
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML=ColValues[1]+"<br /><br />"                
            CellsObj.className="Presstext1"
                  
            
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML=""                
            CellsObj.className=""
        
        }
         
    }


}

//////////////////Press/////////////////////

function CreatePressRecords(tblId)
{
var colCount=0
 var rowCount=0
 if(DataRecords=="")
 return;
  // DataRecords+="NEWS-0000-0001<>Vela Announces MediaAdvantage System for High-Spee<>11<>30<>2006<>NEWS-0000-0001-pdfs.PDF|"; 
 
  var RowValues = DataRecords.split(Delimeter);
    
    TableObj=document.getElementById(tblId)
    //alert(RowValues.length)
    while(rowCount<RowValues.length-1)
    {
        colCount=0
        RowsObj=TableObj.insertRow(rowCount)
        //alert(RowValues.length+":"+rowCount+":"+RowValues[rowCount])
        ColValues=RowValues[rowCount++].split(InnerDelimeter)
        
        CellsObj=RowsObj.insertCell(colCount++)
        CellsObj.innerHTML=ColValues[3]+"-"+getMonth(ColValues[2])+"-"+ColValues[4]
        CellsObj.className="Presstext1"
        CellsObj.width="100px"     
          	
        if(ColValues[5]!="")
        {
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML="<a href=\"uploadedDocs/"+ColValues[5]+"\" >"+ColValues[1]+"</a><br /><br />"                
            CellsObj.className="Presstext1"
           
            
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML="<a href=\"uploadedDocs/"+ColValues[5]+"\" ><img  style=\"border:0px\" src=\"images/pdflogo.gif\" width=\"16\" height=\"16\" /></a>"                
            CellsObj.className="Presstext1"
        }
        else
        {
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML=ColValues[1]+"<br /><br />"                
            CellsObj.className="Presstext1"
           
            
            CellsObj=RowsObj.insertCell(colCount++)
            CellsObj.innerHTML=""                
            CellsObj.className=""
        } 
    }


} 

//////////////////PressMain/////////////////////

function CellData(data)
{
 ColValues=data.split(InnerDelimeter)
 var temp="";
 temp+="<table width=\"400\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
 //temp+="<tr><td height=\"20\" valign=\"top\" class=\"NewsHeader\">NEWS</td></tr>"
 temp+="<tr><td height=\"20\" valign=\"top\">"
 temp+="<a href=\"press.aspx\">"
 temp+=getMonth(ColValues[2])+"."+ColValues[3]+"."+ColValues[4]
 temp+=" | PRESS RELEASE</a></td></tr>"
 temp+="<tr><td valign=\"top\" class=\"Newstext\">"
 temp+="<strong>"+ColValues[1].slice(0,ColValues[1].indexOf(' '))+"</strong>"
 var temp2=ColValues[1].slice(ColValues[1].indexOf(' '))
 if(temp2.length>110)
    temp+=ColValues[1].slice(ColValues[1].indexOf(' '),109)
 else 
    temp+=ColValues[1].slice(ColValues[1].indexOf(' '))
 temp+="...&nbsp"
 if(ColValues[5]!="")
 {
    temp+="<a href=\"uploadedDocs/"+ColValues[5]+"\" ><span class=\"readMore\">"
    temp+="More </span></a>"
 }
 temp+="</td></tr></table>"
 temp+="<tr><td height=\"10\" valign=\"top\">&nbsp;</td></tr>"
 return temp
}

function CreatePressRecordsMain(tblId)
{
var colCount=0
 var rowCount=0
 if(DataRecords=="")
 return;
  // DataRecords+="NEWS-0000-0001<>Vela Announces MediaAdvantage System for High-Spee<>11<>30<>2006<>NEWS-0000-0001-pdfs.PDF|"; 
 
  var RowValues = DataRecords.split(Delimeter);
    
    TableObj=document.getElementById(tblId)
    //alert(RowValues.length)
    while(rowCount<RowValues.length-1)
    {       
        RowsObj=TableObj.insertRow(rowCount)
        //alert(RowValues.length+":"+rowCount+":"+RowValues[rowCount])
        //ColValues=RowValues[rowCount++].split(InnerDelimeter)
        
        CellsObj=RowsObj.insertCell(0)
        CellsObj.innerHTML=CellData(RowValues[rowCount++])
    }

} 

//////////////////Article/////////////////////

function CreateArticleRecords(tblId)
{
var colCount=0
 var rowCount=0
 if(DataRecords=="")
 return;
  // DataRecords+="NEWS-0000-0001<>Vela Announces MediaAdvantage System for High-Spee<>11<>30<>2006<>NEWS-0000-0001-pdfs.PDF|"; 
 
  var RowValues = DataRecords.split(Delimeter);
    
    TableObj=document.getElementById(tblId)
    //alert(RowValues.length)
    while(rowCount<RowValues.length-1)
    {
        colCount=0
        RowsObj=TableObj.insertRow(rowCount)
        //alert(RowValues.length+":"+rowCount+":"+RowValues[rowCount])
        ColValues=RowValues[rowCount++].split(InnerDelimeter)
        
        CellsObj=RowsObj.insertCell(colCount++)
        CellsObj.innerHTML=ColValues[3]+"-"+getMonth(ColValues[2])+"-"+ColValues[4]
        CellsObj.className="Presstext1"
        CellsObj.width="100px"     
          	
        
        CellsObj=RowsObj.insertCell(colCount++)
        CellsObj.innerHTML="<a href=\"uploadedDocs/"+ColValues[5]+"\" >"+ColValues[1]+"</a><br /><br />"                
        CellsObj.className="Presstext1"
           
            
        CellsObj=RowsObj.insertCell(colCount++)
         CellsObj.innerHTML="<a href=\"uploadedDocs/"+ColValues[5]+"\" ><img  style=\"border:0px\" src=\"images/pdflogo.gif\" width=\"16\" height=\"16\" /></a>"                
        CellsObj.className="Presstext1"
          
         
    }


} 

//////////////////////////Side Archive///////////////

function CreateYearRecords(tblId)
 {
 var colCount=0
 var rowCount=0
 if(DataYears=="")
 return;
  
 // var DataYears="";  DataYears+="2006|";  DataYears+="2005|"; 
 
  var RowValues = DataYears.split(Delimeter);
   var temp="";
    TableObj=document.getElementById(tblId)
    
    temp+="<ul>"
    //alert(RowValues.length)
    while(rowCount<RowValues.length-1)
    {
       temp+="<li><a href=\"archive.aspx?year="+RowValues[rowCount]+"\">ARCHIVE FOR "+RowValues[rowCount++]+"</a> </li>"                                	
        
     }
     temp+="</ul>"
    TableObj.innerHTML=temp; 
 }

///////////software driver/////////////

function CreateSoft(tblId,textValue)
{
    var colCount=0
 var rowCount=0
 var actRow=0;
 if(DataRecords=="")
 return;
 //  DataRecords+="SOFT-0000-0002<>Linux Software for CineView II and Quad Decoders<>1<>SOFT-0000-0002-pdfs.DOC|"; 

  var RowValues = DataRecords.split(Delimeter);
    
    TableObj=document.getElementById(tblId)
    //alert(RowValues.length)
    while(rowCount<RowValues.length-1)
    {
      
        ColValues=RowValues[rowCount++].split(InnerDelimeter)
        if(ColValues[2]!=textValue)
            continue;
        
        RowsObj=TableObj.insertRow(++actRow)
        
        CellsObj=RowsObj.insertCell(0)
        CellsObj.innerHTML=ColValues[1]       
        CellsObj.valign="middle"
        CellsObj.align="left"  
        
        CellsObj=RowsObj.insertCell(1)
        var temp="<a href=\"uploadedDocs/"+ColValues[3]+"\" target=\"_blank\">"
        temp+=" <img border=\"0\" alt=\"download\" src=\"images/logo.jpg\" width=\"103\" height=\"74\" /></a>"
        CellsObj.innerHTML=temp       
        CellsObj.align="center"  
         
    }
}
