﻿/*******Srolling Left and right***************/
scrollStep=2
timerLeft=""
timerRight=""

function scrollDivLeft(id)
{
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10)
}

function scrollDivRight(id)
{
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10)
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}
/***********************************************/
function RunFlash(FilePath, width, height) {
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');
    document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
    document.write('width="' + width + '" height="' + height + '"> \n');
    document.write('<param name="allowScriptAccess" value="sameDomain" /> \n');
    document.write('<param name="movie" value="' + FilePath + '" /> \n');
    document.write('<param name="wmode" value="transparent" />\n');
    document.write('<param name="quality" value="high" /> \n');
    document.write('<embed src="' + FilePath + '" quality="high" wmode="transparent" ');
    document.write('width="' + width + '" height="' + height + '"  allowScriptAccess="sameDomain" ');
    document.write(' type="application/x-shockwave-flash" ');
    document.write('pluginspage="http://www.macromedia.com/go/getflashplayer" />');
    document.write('</object>');
}
///////////////
function SelectedLink(linkID) {
    if (document.getElementById(linkID)) {
        document.getElementById(linkID).className = "Selectedlink";
    }
}
///////////////////////////////////////////
function ValidateSelection(source, arguments) {
    var List = document.getElementById("ctl00_ContentPlaceHolder1_DropDownListHowDidU");
    if (null != List) {
        var iValue = new Number(List[List.selectedIndex].value);
        arguments.IsValid = (iValue != -1);

    }
    else {
        arguments.IsValid = false;
    }
}
////////////////////////////////
function ValidateServiceSelection(source, arguments) {
    var List = document.getElementById("ctl00_ContentPlaceHolder1_ddl_Services");
    if (null != List) {
        var iValue = new Number(List[List.selectedIndex].value);
        arguments.IsValid = (iValue != -1);

    }
    else {
        arguments.IsValid = false;
    }
}
///////////////////
function ValidateCountrySelection(source, arguments) {
    var List = document.getElementById("ctl00_ContentPlaceHolder1_DD_Country");
    if (null != List) {
        var iValue = new Number(List[List.selectedIndex].value);
        arguments.IsValid = (iValue != -1);

    }
    else {
        arguments.IsValid = false;
    }
}

///////////////////////////
function ValidateBudgetSelection(source, arguments) {
    var List = document.getElementById("ctl00_ContentPlaceHolder1_ddl_Budget");
    if (null != List) {
        var iValue = new Number(List[List.selectedIndex].value);
        arguments.IsValid = (iValue != -1);

    }
    else {
        arguments.IsValid = false;
    }
}
//////////////////////////
function ValidateAssistanceSelection(source, arguments) {
    var List = document.getElementById("ctl00_ContentPlaceHolder1_ddl_Assistance");
    if (null != List) {
        var iValue = new Number(List[List.selectedIndex].value);
        arguments.IsValid = (iValue != -1);

    }
    else {
        arguments.IsValid = false;
    }
}
function OpenPage(url) {
    //alert(window.location.href);
    window.location = url;
}

