<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Jobs Today"
description="Find Live Jobs In USA"
title_url="http://www.picsnpics.com"
author="Sharath"
author_email="sharath2air@gmail.com"
thumbnail="http://hosting.gmodules.com/ig/gadgets/file/113504637211788799284/jobst.jpg"
author_affiliation="picsnpics"
directory_title="Jobs Today"
screenshot="http://hosting.gmodules.com/ig/gadgets/file/113504637211788799284/jobs.jpg"
>
<Require feature="dynamic-height"/>
<Require feature="opensocial-0.7"/>
<Require feature="views"/>
<Locale messages="http://hosting.gmodules.com/ig/gadgets/file/113504637211788799284/ALL_ALL.xml"/>
<Locale lang="en" messages="http://hosting.gmodules.com/ig/gadgets/file/113504637211788799284/en_ALL.xml"/>
<Locale lang="pt" messages="http://hosting.gmodules.com/ig/gadgets/file/113504637211788799284/pt_ALL.xml"/>
<Locale lang="pt-BR" messages="http://hosting.gmodules.com/ig/gadgets/file/113504637211788799284/pt_ALL.xml"/>
</ModulePrefs>
<Content type="html" view="profile"><![CDATA[
<div id="iframe"></div>
<script type="text/javascript">
  gadgets.window.adjustHeight(510);
  _IG_RegisterOnloadHandler(function() {
var iframeURL = "http://www.picsnpics.com/jobs/jobs.html";
_gel("iframe").innerHTML = "<iframe frameborder='0' width='502' height='510' src='"+ iframeURL + "'>";
});
</script>
]]></Content>
<Content type="html" view="canvas"><![CDATA[

<script type="text/javascript">

  function sendEmail() {
var params = [];
params[opensocial.Message.Field.TITLE]="__MSG_msgtitle__";
var body="__MSG_msgbody__ http://www.orkut.com/AppInfo.aspx?appId=65002029636";
var message = opensocial.newMessage(body, params);
var recipient = opensocial.DataRequest.Group.VIEWER_FRIENDS;
//var recipient = opensocial.DataRequest.PersonId.OWNER;
opensocial.requestSendMessage(recipient, message);
};
gadgets.window.adjustHeight(600);
_IG_RegisterOnloadHandler(function() {
var iframeURL = "http://www.picsnpics.com/jobs/jobs.html";
_gel("iframe").innerHTML = "<iframe frameborder='0' width='730' height='600' src='"+ iframeURL + "'>";
});
</script>
  <!--
<div id="div1" style="height: 22px;">
<form name="x">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" value="__MSG_sendtofriend__" name="send" onClick="sendEmail()">
</form>
</div>
-->
<div id="iframe"></div>
<!--
<script>
var calendarDate3=prefs.getString("keywords");
function init(){
var req=opensocial.newDataRequest();
req.add(req.newFetchPeopleRequest('VIEWER'),'viewer');
req.add(req.newFetchPersonAppDataRequest('VIEWER','installed'),'viewerData');
req.send(onResponse);
}
function onResponse(data){
if(!data.hadError()){
var viewerId=data.get('viewer').getData().asArray()[0].getId();
var viewerData=data.get('viewerData').getData()[viewerId];
if(calendarDate3!=viewerData.installed){
//alert('App not installed');
var req=opensocial.newDataRequest();
req.add(req.newUpdatePersonAppDataRequest('VIEWER','installed',calendarDate3),'installationUpdate');
req.send(install);
}
else{
// alert('App is already installed');
}
}
}

function install(data){
if(!data.hadError()){
//TODO - installation code goes here
function createActivity() {
var title= '';
title = ", __MSG_activity__ " + calendarDate3 + " __MSG_activity1__";
//title = ', Got Top Videos on the Profile. View best collection of Videos ';
//alert(1);
var activity_params={};
activity_params[opensocial.Activity.Field.TITLE] = title;
activity_params[opensocial.Activity.Field.BODY] = "<a href='/AppInfo.aspx?&appId=65002029636'>Add Favourite Videos to Your Profile</a>";
var activity = opensocial.newActivity(activity_params);
//alert(activity);
opensocial.requestCreateActivity(activity, "HIGH",
getCreateActivityResp);

}

function getCreateActivityResp(responseItem) {
console.log(responseItem);
var htmlout = '';
if(responseItem.hadError()){
//htmlout= 'has error: ' + responseItem.ErrorMessage;
//alert(responseItem.ErrorMessage +'has error');

}

else{
//alert('create activity good!')

}
}

createActivity();
// alert('App installed successfully');

}
}
gadgets.util.registerOnLoadHandler(init);
</script>
-->
<!--
<script>
var calendarDate19=prefs.getString("keywords");
function init(){
var req = opensocial.newDataRequest();
req.add(req.newFetchPeopleRequest('VIEWER'),'viewer');
req.add(req.newFetchPersonAppDataRequest('VIEWER','installedk1'), 'viewerData');
req.send(onResponse);
}

function onResponse(data){
if(!data.hadError()){
// var viewerId = data.get('viewer').getData().getId();
var viewerId=data.get('viewer').getData().asArray()[0].getId();
var viewerData = data.get('viewerData').getData()[viewerId];

if(!viewerData || (calendarDate19!=viewerData.installedk1)){

//alert('App not installed');

var req = opensocial.newDataRequest();
req.add(req.newUpdatePersonAppDataRequest('VIEWER', 'installedk1', calendarDate19), 'installationUpdate');

req.send(install);
}
else{
//alert('App is already installed');
}
}
}

function createActivity() {
var body = '';
var title= '';
body = "<a href='/AppInfo.aspx?&appId=65002029636'><img src='http://hosting.gmodules.com/ig/gadgets/file/113504637211788799284/update1.jpg'></a>"+"<a href='/AppInfo.aspx?&appId=65002029636'>__MSG_activity2__</a>";
title = ", __MSG_activity__ " + calendarDate19 + " __MSG_activity1__";

var activity_params={};
activity_params[opensocial.Activity.Field.TITLE] = title;
activity_params[opensocial.Activity.Field.BODY] = body;
var activity = opensocial.newActivity(activity_params);


opensocial.requestCreateActivity(activity, "HIGH", getCreateActivityResp);
}

function getCreateActivityResp(responseItem) {
if(responseItem.hadError()) {
//alert('App not installed correctly');
} else {
//alert('App installed successfully');

}
}

function install(data){
if(!data.hadError()){
createActivity();

}
}

gadgets.util.registerOnLoadHandler(init);
</script>
-->
]]></Content>
</Module>
