﻿// JScript File
function sendcontactinfo() {

    if (validate_request_proposal()) {
       
        var ContactName = document.cfrm.personname.value;
        var ContactCompany = document.cfrm.organisationname.value;
        var ContactPhone = document.cfrm.phone.value;
        var ContactEmail = document.cfrm.emailaddress.value;
        var ContactMessage = document.cfrm.message.value;
                  
        document.cfrm.action = "SendContactInfo.aspx?cntName=" + ContactName + "&cntEmail=" + ContactEmail + "&cntPh=" + ContactPhone + "&cntCmp=" + ContactCompany + "&cntMess=" + ContactMessage;
        document.cfrm.submit();

        document.cfrm.personname.focus();
        alert("Thanks for sending your Proposal.Our Business Manager will Contact you soon.");
        return false;
    }
    else 
    {
        return false;
    }
}
function validate_request_proposal() 
{
    if (document.cfrm.personname.value == "") {
        alert("Please Enter Your Name");
        document.cfrm.personname.focus();
        return false;
    }
    if (document.cfrm.organisationname.value == "") {
        alert("Please Enter Company Name");
        document.cfrm.organisationname.focus();
        return false;
    }
    
    if (document.cfrm.emailaddress.value == "") {
        alert("Please Enter Email Address");
        document.cfrm.emailaddress.focus();
        return false;
    }
    else
        var email = document.cfrm.emailaddress.value;
        if (!checkemail(email)) {
            alert("Please Enter valid Email Address");
            document.cfrm.emailaddress.focus();
        return false;
    }
    if (document.cfrm.phone.value == "") {
        alert("Please Enter Phone Number");
        document.cfrm.phone.focus();
        return false;
    }
    else
        return true;
}
function checkemail(vemail)
{
        var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
        if (filter.test(vemail))
        return true;
        else
        return false;
}

function SendEmailInfo() {
    //debugger;
    if (validate_request_proposal_contactus()) {
        var FormName = "frmcontactus";
        var ContactName = document.frmcontactus.personname.value;
        var ContactCompany = document.frmcontactus.organizationname.value;
        var ContactEmail = document.frmcontactus.emailaddress.value;
        var ContactPhone = document.frmcontactus.phone.value;
        var ContactMessage = document.frmcontactus.message.value;


        document.frmcontactus.action = "SendContactInfo.aspx?cntName=" + ContactName + "&cntEmail=" + ContactEmail + "&cntPh=" + ContactPhone + "&cntCmp=" + ContactCompany + "&cntMess=" + ContactMessage + "&cntForm=" + FormName;
        document.frmcontactus.submit();
 
        alert("Thanks for sending your Proposal.Our Business Manager`s will Contact you soon.");
        return false;
    }
    else 
    {
         return false;
    
    }
}
function validate_request_proposal_contactus() {
    if (document.frmcontactus.personname.value == "Name:"){
        alert("Please Enter Your Name");
        document.frmcontactus.personname.focus();
        return false;
    }
    if (document.frmcontactus.organizationname.value == "Organization:") {
        alert("Please Enter Company Name");
        document.frmcontactus.organizationname.focus();
        return false;
    }
    if (document.frmcontactus.phone.value == "Phone:") {
        alert("Please Enter Phone Number");
        document.frmcontactus.phone.focus();
        return false;
    }
    if (document.frmcontactus.organizationname.value == "Email ID:") {
        alert("Please Enter Email Address");
        document.frmcontactus.emailaddress.focus();
        return false;
    }
    else
        var email = document.frmcontactus.emailaddress.value;
    if (!checkemail(email)) {
        alert("Please Enter valid Email Address");
        document.frmcontactus.emailaddress.focus();
        return false;
    }
    
    else
        return true;
}

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}


pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}



pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}


pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}


pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}


var pausecontent2=new Array()
pausecontent2[0]='<strong>Client: Design Firm</strong><br/>One of our clients is a design firm that provides services in Web site design, E-commerce design and development, Web-based application design and development, print collateral design, and search engine marketing.<br/><br/>They sought solutions that would help their company increase the number of projects that it could handle by increasing its staff but without increasing costs.Talent Gurus’ solution to their problem was providing them with skilled PHP (PHP:  Hypertext Preprocessor) and web programmers that work on their various client projects.'
pausecontent2[1]='<strong>Client: Consulting Firm</strong><br/>Another client is a consulting firm that provides strategic talent sourcing and acquisition, and human capital and capabilities improvement in three primary markets: Professional Services and Consulting, Corporate Boards, and Industry Executives. They sought solutions that would double their potential consultant base within a limited amount of time.Using our skilled telemarketing resources, the company was able to increase the number of leads that it generated to firms providing audit, tax, and advisory services.'
pausecontent2[2]='<strong>Client: Medical Staffing Firm</strong><br/>Another client that we have provided services to is a medical staffing firm that specializes in Locum Tenens, permanent and contract placements of physicians, physician assistants, certified registered nurse anesthetists, nurse practitioners, and other allied healthcare professionals to facilities nationwide. The company wanted various solutions that included Web design, Web development, and custom database and application design.<br/><br/>Talent Gurus provided Web designers, Web developers, and application and database developers to meet this client’s needs. Our resources designed and developed the company’s Web site as well as multiple custom database applications.'
